Skip to content

Commit 8f940c3

Browse files
committed
Update expectations and add expected diagnostics
1 parent a1a7640 commit 8f940c3

File tree

8 files changed

+19
-3
lines changed

8 files changed

+19
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| Test.java:0:0:0:0 | 1 |
1+
| file://:0:0:0:0 | 1 errors during annotation processing |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
public class Test implements Unavailable<String> { }
2+
3+
// Diagnostic Matches: 1 errors during annotation processing
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| Test.java:0:0:0:0 | 2 javac errors |
2+
| Test.java:6:23:6:39 | Unexpected symbol for constructor: new NoSuchClass() |
3+
| file://:0:0:0:0 | 2 errors during annotation processing |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import java
2+
import semmle.code.java.Diagnostics
3+
4+
select any(Diagnostic d | not d.toString().matches("Not rewriting trap file for%"))

java/ql/test/library-tests/errortype/PrintAst.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Test.java:
2-
# 6| [TypeAccess] NoSuchClass
32
# 0| [CompilationUnit] Test
43
#-----| -1: (Imports)
54
# 1| 1: [ImportType] import NoSuchClass
@@ -10,5 +9,7 @@ Test.java:
109
# 6| 0: [LocalVariableDeclStmt] var ...;
1110
# 6| 0: [TypeAccess] NoSuchClass
1211
# 6| 1: [LocalVariableDeclExpr] nsc
12+
# 6| 0: [ClassInstanceExpr] <ClassInstanceExpr that calls a missing constructor>
13+
# 6| -3: [TypeAccess] NoSuchClass
1314
# 7| 1: [ReturnStmt] return ...
1415
# 7| 0: [VarAccess] nsc

java/ql/test/library-tests/errortype/Test.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ public NoSuchClass test() {
88
}
99

1010
}
11+
12+
// Diagnostic Matches: Unexpected symbol for constructor: new NoSuchClass()
13+
// Diagnostic Matches: 2 javac errors
14+
// Diagnostic Matches: 2 errors during annotation processing
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| module-info-wrong-name.java:0:0:0:0 | 2 |
1+
| file://:0:0:0:0 | 2 errors during annotation processing |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module module.with.wrong.name {
22
exports somepkg;
33
}
4+
5+
// Diagnostic Matches: 2 errors during annotation processing

0 commit comments

Comments
 (0)