mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Swift: add diagnostics test case
This commit is contained in:
@@ -0,0 +1 @@
|
||||
| file://:0:0:0:0 | Diagnostics | getText: | Hello, warning | getKind: | 2 |
|
||||
8
swift/ql/test/extractor-tests/Diagnostics/Diagnostics.ql
Normal file
8
swift/ql/test/extractor-tests/Diagnostics/Diagnostics.ql
Normal file
@@ -0,0 +1,8 @@
|
||||
import codeql.swift.elements
|
||||
import TestUtils
|
||||
|
||||
from Diagnostics x, string getText, int getKind
|
||||
where
|
||||
getText = x.getText() and
|
||||
getKind = x.getKind()
|
||||
select x, "getText:", getText, "getKind:", getKind
|
||||
1
swift/ql/test/extractor-tests/Diagnostics/diags.swift
Normal file
1
swift/ql/test/extractor-tests/Diagnostics/diags.swift
Normal file
@@ -0,0 +1 @@
|
||||
#warning("Hello, warning")
|
||||
@@ -1,4 +0,0 @@
|
||||
// generated by codegen/codegen.py
|
||||
|
||||
After a swift source file is added in this directory and codegen/codegen.py is run again, test queries
|
||||
will appear and this file will be deleted
|
||||
Reference in New Issue
Block a user