mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Add extractor test that empty interface type exists
This commit is contained in:
1
ql/test/extractor-tests/empty-interface/tst.expected
Normal file
1
ql/test/extractor-tests/empty-interface/tst.expected
Normal file
@@ -0,0 +1 @@
|
||||
| success |
|
||||
9
ql/test/extractor-tests/empty-interface/tst.go
Normal file
9
ql/test/extractor-tests/empty-interface/tst.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
// This file tests that the extractor does not crash on files that do not
|
||||
// end in a newline, so it is important not to autoformat this file.
|
||||
|
||||
// autoformat-ignore
|
||||
|
||||
func main() {
|
||||
}
|
||||
4
ql/test/extractor-tests/empty-interface/tst.ql
Normal file
4
ql/test/extractor-tests/empty-interface/tst.ql
Normal file
@@ -0,0 +1,4 @@
|
||||
import go
|
||||
|
||||
where exists(InterfaceType empty | not empty.hasMethod(_, _))
|
||||
select "success"
|
||||
Reference in New Issue
Block a user