Skip to content

Commit 3b42c48

Browse files
committed
BAEL-2347: Fixed test about return value of assignment operator.
1 parent f5b4a5e commit 3b42c48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: core-java-lang/src/test/java/com/baeldung/compoundoperators/CompoundOperatorsTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public void whenCompoundAssignmentUsed_thenSameAsSimpleAssignment() {
2424

2525
@Test
2626
public void whenAssignmentOperatorIsUsed_thenValueIsReturned() {
27-
long x = 5;
28-
long y = (x=3);
27+
long x = 1;
28+
long y = (x+=2);
2929

3030
assertEquals(3, y);
3131
assertEquals(y, x);

0 commit comments

Comments
 (0)