Files
codeql/java/ql/test/library-tests/literals/booleanLiterals/BooleanLiterals.java
Marcono1234 bb6e6f4808 Java: Split literals tests
This allows changing individual tests in the future without having to adjust
the expected output of all other tests.
2021-10-01 17:27:50 +02:00

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;
}