mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
Update expectations and add expected diagnostics
This commit is contained in:
@@ -1 +1 @@
|
||||
| Test.java:0:0:0:0 | 1 |
|
||||
| file://:0:0:0:0 | 1 errors during annotation processing |
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
public class Test implements Unavailable<String> { }
|
||||
|
||||
// Diagnostic Matches: 1 errors during annotation processing
|
||||
|
||||
3
java/ql/test/library-tests/errortype/Diags.expected
Normal file
3
java/ql/test/library-tests/errortype/Diags.expected
Normal 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 |
|
||||
4
java/ql/test/library-tests/errortype/Diags.ql
Normal file
4
java/ql/test/library-tests/errortype/Diags.ql
Normal 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%"))
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +1 @@
|
||||
| module-info-wrong-name.java:0:0:0:0 | 2 |
|
||||
| file://:0:0:0:0 | 2 errors during annotation processing |
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
module module.with.wrong.name {
|
||||
exports somepkg;
|
||||
}
|
||||
|
||||
// Diagnostic Matches: 2 errors during annotation processing
|
||||
|
||||
Reference in New Issue
Block a user