Fixup tests from code review changes

This commit is contained in:
Jonathan Leitschuh
2022-03-04 09:33:51 -05:00
parent 17b6e66814
commit 38897f2ec1
4 changed files with 7 additions and 7 deletions

View File

@@ -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'

View File

@@ -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

View File

@@ -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

View File

@@ -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 |