Update expectations and add expected diagnostics

This commit is contained in:
Chris Smowton
2023-09-14 14:35:41 +01:00
parent a1a7640427
commit 8f940c311a
8 changed files with 19 additions and 3 deletions

View File

@@ -1 +1 @@
| Test.java:0:0:0:0 | 1 |
| file://:0:0:0:0 | 1 errors during annotation processing |

View File

@@ -1 +1,3 @@
public class Test implements Unavailable<String> { }
// Diagnostic Matches: 1 errors during annotation processing

View File

@@ -0,0 +1,3 @@
| Test.java:0:0:0:0 | 2 javac errors |
| Test.java:6:23:6:39 | Unexpected symbol for constructor: new NoSuchClass() |
| file://:0:0:0:0 | 2 errors during annotation processing |

View File

@@ -0,0 +1,4 @@
import java
import semmle.code.java.Diagnostics
select any(Diagnostic d | not d.toString().matches("Not rewriting trap file for%"))

View File

@@ -1,5 +1,4 @@
Test.java:
# 6| [TypeAccess] NoSuchClass
# 0| [CompilationUnit] Test
#-----| -1: (Imports)
# 1| 1: [ImportType] import NoSuchClass
@@ -10,5 +9,7 @@ Test.java:
# 6| 0: [LocalVariableDeclStmt] var ...;
# 6| 0: [TypeAccess] NoSuchClass
# 6| 1: [LocalVariableDeclExpr] nsc
# 6| 0: [ClassInstanceExpr] <ClassInstanceExpr that calls a missing constructor>
# 6| -3: [TypeAccess] NoSuchClass
# 7| 1: [ReturnStmt] return ...
# 7| 0: [VarAccess] nsc

View File

@@ -8,3 +8,7 @@ public class Test {
}
}
// Diagnostic Matches: Unexpected symbol for constructor: new NoSuchClass()
// Diagnostic Matches: 2 javac errors
// Diagnostic Matches: 2 errors during annotation processing

View File

@@ -1 +1 @@
| module-info-wrong-name.java:0:0:0:0 | 2 |
| file://:0:0:0:0 | 2 errors during annotation processing |

View File

@@ -1,3 +1,5 @@
module module.with.wrong.name {
exports somepkg;
}
// Diagnostic Matches: 2 errors during annotation processing