Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixup tests from code review changes
  • Loading branch information
JLLeitschuh committed Mar 4, 2022
commit 38897f2ec18d4949a49a2ac0a5983041d04e40d3
4 changes: 2 additions & 2 deletions java/ql/test/library-tests/constants/PrintAst.expected
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,11 @@ constants/Values.java:
# 90| 0: [VarAccess] var_field
# 91| 68: [LocalVariableDeclStmt] var ...;
# 91| 0: [TypeAccess] String
# 91| 1: [LocalVariableDeclExpr] concatinatedString
# 91| 1: [LocalVariableDeclExpr] concatenatedString
# 91| 0: [StringLiteral] "a" + "b"
# 92| 69: [LocalVariableDeclStmt] var ...;
# 92| 0: [TypeAccess] String
# 92| 1: [LocalVariableDeclExpr] concatinatedChar
# 92| 1: [LocalVariableDeclExpr] concatenatedChar
# 92| 0: [AddExpr] ... + ...
# 92| 0: [StringLiteral] "ab"
# 92| 1: [CharacterLiteral] 'c'
4 changes: 2 additions & 2 deletions java/ql/test/library-tests/constants/getBooleanValue.ql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import semmle.code.java.Variable

from Variable v, Expr init, RefType enclosing, boolean constant
from Variable v, CompileTimeConstantExpr init, RefType enclosing, boolean constant
where
v.getInitializer() = init and
init.getEnclosingCallable().getDeclaringType() = enclosing and
enclosing.hasQualifiedName("constants", "Values") and
constant = init.(CompileTimeConstantExpr).getBooleanValue()
constant = init.getBooleanValue()
select init, constant
4 changes: 2 additions & 2 deletions java/ql/test/library-tests/constants/getIntValue.ql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import semmle.code.java.Variable

from Variable v, Expr init, RefType enclosing, int constant
from Variable v, CompileTimeConstantExpr init, RefType enclosing, int constant
where
v.getInitializer() = init and
init.getEnclosingCallable().getDeclaringType() = enclosing and
enclosing.hasQualifiedName("constants", "Values") and
constant = init.(CompileTimeConstantExpr).getIntValue()
constant = init.getIntValue()
select init, constant
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
| constants/Values.java:19:29:19:31 | '*' | * |
| constants/Values.java:91:37:91:45 | "a" + "b" | ab |
| constants/Values.java:92:29:92:38 | ... + ... | abc |
| constants/Values.java:92:35:92:44 | ... + ... | abc |