| 1 |
public class EqualityTests { |
| 2 |
// the Interning checker correctly issues an error below, but we would like to keep this test in |
| 3 |
// all-systems. |
| 4 |
@SuppressWarnings("Interning") |
| 5 |
public boolean compareLongs(Long v1, Long v2) { |
| 6 |
// This expression used to cause an assertion |
| 7 |
// failure in GLB computation. |
| 8 |
return !(((v1 == 0) || (v2 == 0)) && (v1 != v2)); |
| 9 |
} |
| 10 |
|
| 11 |
public int charEquals(boolean cond) { |
| 12 |
char result = 'F'; |
| 13 |
if (cond) { |
| 14 |
result = 'T'; |
| 15 |
} |
| 16 |
|
| 17 |
if (result == 'T') { |
| 18 |
return 1; |
| 19 |
} else { |
| 20 |
assert result == '?'; |
| 21 |
} |
| 22 |
return 10; |
| 23 |
} |
| 24 |
} |