mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
This allows changing individual tests in the future without having to adjust the expected output of all other tests.
32 lines
529 B
Java
32 lines
529 B
Java
package booleanLiterals;
|
|
|
|
public class BooleanLiterals {
|
|
boolean[] booleans = {
|
|
true,
|
|
false,
|
|
// Using Unicode escapes (which are handled during pre-processing)
|
|
\u0074\u0072\u0075\u0065, // true
|
|
};
|
|
|
|
// The operation expression (e.g. `&&`) is not a literal
|
|
boolean[] logicOperations = {
|
|
true && true,
|
|
false && false,
|
|
true && false,
|
|
true || true,
|
|
false || false,
|
|
true || false,
|
|
};
|
|
|
|
Object[] nonBooleanLiterals = {
|
|
"true",
|
|
"false",
|
|
1,
|
|
0,
|
|
Boolean.TRUE,
|
|
Boolean.FALSE,
|
|
};
|
|
|
|
boolean nonLiteral;
|
|
}
|