I'll give you a bit more on this:
if(test1 && test2 = 3)

but, the compiler gives an error of:

11 C:\Programming Projects\main.cpp
non-lvalue in assignment
As others have said, the error was in not using == (and not using it with both), but I'll try to explain the error message that it is actually giving.

First off, an l-value (in this particular context - it does have other meanings in other contexts) is basically something that can be assigned to (i.e. a variable - something you can put a value into). Now, the && operator is evaluated before the = operator (the operator precedence). Now, && returns true if both operands are true (i.e. non-zero), and false otherwise. Note, it returns a value, and not a reference to a variable. So, depending on what test1 and test2 are, that statement is trying to do one of the following:

true = 3;
false = 3;

That is, it is attempting to assign the value 3 to a boolean value, not a variable. Clearly, this can't be done. So, when it says something is not an l-value (in this context), it means that it is a value, and not a variable.

The other context that comes to mind has to do with accessing members of structures, but that might be a bit much for now.