mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
aggregate the tests in library-tests/Externs into a single .ql file
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
| Point.js:1:21:1:43 | functio ... , y) {} |
|
||||
| Point.js:3:1:3:43 | Point.p ... dy) {}; |
|
||||
| Point.js:4:1:4:25 | Point.p ... j = {}; |
|
||||
| Point.js:5:1:5:23 | Point.p ... secret; |
|
||||
| Point.js:7:1:7:13 | Point.ORIGIN; |
|
||||
| Point.js:8:1:8:26 | Point.f ... n() {}; |
|
||||
| Point.js:10:5:10:14 | someGlobal |
|
||||
| Point.js:13:5:13:12 | MyString |
|
||||
| Point.js:15:1:15:25 | Point.p ... inal']; |
|
||||
| Point.js:18:5:18:10 | aPoint |
|
||||
@@ -1,4 +0,0 @@
|
||||
import semmle.javascript.Externs
|
||||
|
||||
from ExternalDecl ed
|
||||
select ed
|
||||
@@ -1,10 +0,0 @@
|
||||
| Point.js:1:21:1:43 | functio ... , y) {} | Point |
|
||||
| Point.js:3:1:3:43 | Point.p ... dy) {}; | move |
|
||||
| Point.js:4:1:4:25 | Point.p ... j = {}; | obj |
|
||||
| Point.js:5:1:5:23 | Point.p ... secret; | secret |
|
||||
| Point.js:7:1:7:13 | Point.ORIGIN; | ORIGIN |
|
||||
| Point.js:8:1:8:26 | Point.f ... n() {}; | foo |
|
||||
| Point.js:10:5:10:14 | someGlobal | someGlobal |
|
||||
| Point.js:13:5:13:12 | MyString | MyString |
|
||||
| Point.js:15:1:15:25 | Point.p ... inal']; | final |
|
||||
| Point.js:18:5:18:10 | aPoint | aPoint |
|
||||
@@ -1,4 +0,0 @@
|
||||
import semmle.javascript.Externs
|
||||
|
||||
from ExternalDecl ed
|
||||
select ed, ed.getName()
|
||||
@@ -1,10 +0,0 @@
|
||||
| Point.js:1:21:1:43 | functio ... , y) {} | Point |
|
||||
| Point.js:3:1:3:43 | Point.p ... dy) {}; | Point.move |
|
||||
| Point.js:4:1:4:25 | Point.p ... j = {}; | Point.obj |
|
||||
| Point.js:5:1:5:23 | Point.p ... secret; | Point.secret |
|
||||
| Point.js:7:1:7:13 | Point.ORIGIN; | Point.ORIGIN |
|
||||
| Point.js:8:1:8:26 | Point.f ... n() {}; | Point.foo |
|
||||
| Point.js:10:5:10:14 | someGlobal | someGlobal |
|
||||
| Point.js:13:5:13:12 | MyString | MyString |
|
||||
| Point.js:15:1:15:25 | Point.p ... inal']; | Point.final |
|
||||
| Point.js:18:5:18:10 | aPoint | aPoint |
|
||||
@@ -1,4 +0,0 @@
|
||||
import semmle.javascript.Externs
|
||||
|
||||
from ExternalDecl ed
|
||||
select ed, ed.getQualifiedName()
|
||||
@@ -1 +0,0 @@
|
||||
| Point.js:13:5:13:12 | MyString |
|
||||
@@ -1,4 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from ExternalTypedef et
|
||||
select et
|
||||
@@ -1,4 +0,0 @@
|
||||
| Point.js:1:21:1:43 | functio ... , y) {} | Point.js:1:21:1:43 | functio ... , y) {} |
|
||||
| Point.js:3:1:3:43 | Point.p ... dy) {}; | Point.js:3:24:3:42 | function(dx, dy) {} |
|
||||
| Point.js:4:1:4:25 | Point.p ... j = {}; | Point.js:4:23:4:24 | {} |
|
||||
| Point.js:8:1:8:26 | Point.f ... n() {}; | Point.js:8:13:8:25 | function() {} |
|
||||
@@ -1,4 +0,0 @@
|
||||
import semmle.javascript.Externs
|
||||
|
||||
from ExternalVarDecl ed
|
||||
select ed, ed.getInit()
|
||||
@@ -1 +0,0 @@
|
||||
| Point.js:18:5:18:10 | aPoint | aPoint | Point.js:1:21:1:43 | functio ... , y) {} |
|
||||
@@ -1,4 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from ExternalVarDecl v
|
||||
select v, v.getQualifiedName(), v.getTypeTag().getTypeDeclaration()
|
||||
42
javascript/ql/test/library-tests/Externs/tests.expected
Normal file
42
javascript/ql/test/library-tests/Externs/tests.expected
Normal file
@@ -0,0 +1,42 @@
|
||||
externalDecl_getName
|
||||
| Point.js:1:21:1:43 | functio ... , y) {} | Point |
|
||||
| Point.js:3:1:3:43 | Point.p ... dy) {}; | move |
|
||||
| Point.js:4:1:4:25 | Point.p ... j = {}; | obj |
|
||||
| Point.js:5:1:5:23 | Point.p ... secret; | secret |
|
||||
| Point.js:7:1:7:13 | Point.ORIGIN; | ORIGIN |
|
||||
| Point.js:8:1:8:26 | Point.f ... n() {}; | foo |
|
||||
| Point.js:10:5:10:14 | someGlobal | someGlobal |
|
||||
| Point.js:13:5:13:12 | MyString | MyString |
|
||||
| Point.js:15:1:15:25 | Point.p ... inal']; | final |
|
||||
| Point.js:18:5:18:10 | aPoint | aPoint |
|
||||
externalDecl_getQualifiedName
|
||||
| Point.js:1:21:1:43 | functio ... , y) {} | Point |
|
||||
| Point.js:3:1:3:43 | Point.p ... dy) {}; | Point.move |
|
||||
| Point.js:4:1:4:25 | Point.p ... j = {}; | Point.obj |
|
||||
| Point.js:5:1:5:23 | Point.p ... secret; | Point.secret |
|
||||
| Point.js:7:1:7:13 | Point.ORIGIN; | Point.ORIGIN |
|
||||
| Point.js:8:1:8:26 | Point.f ... n() {}; | Point.foo |
|
||||
| Point.js:10:5:10:14 | someGlobal | someGlobal |
|
||||
| Point.js:13:5:13:12 | MyString | MyString |
|
||||
| Point.js:15:1:15:25 | Point.p ... inal']; | Point.final |
|
||||
| Point.js:18:5:18:10 | aPoint | aPoint |
|
||||
externalDecl
|
||||
| Point.js:1:21:1:43 | functio ... , y) {} |
|
||||
| Point.js:3:1:3:43 | Point.p ... dy) {}; |
|
||||
| Point.js:4:1:4:25 | Point.p ... j = {}; |
|
||||
| Point.js:5:1:5:23 | Point.p ... secret; |
|
||||
| Point.js:7:1:7:13 | Point.ORIGIN; |
|
||||
| Point.js:8:1:8:26 | Point.f ... n() {}; |
|
||||
| Point.js:10:5:10:14 | someGlobal |
|
||||
| Point.js:13:5:13:12 | MyString |
|
||||
| Point.js:15:1:15:25 | Point.p ... inal']; |
|
||||
| Point.js:18:5:18:10 | aPoint |
|
||||
externalTypedef
|
||||
| Point.js:13:5:13:12 | MyString |
|
||||
externalVarDecl_getInit
|
||||
| Point.js:1:21:1:43 | functio ... , y) {} | Point.js:1:21:1:43 | functio ... , y) {} |
|
||||
| Point.js:3:1:3:43 | Point.p ... dy) {}; | Point.js:3:24:3:42 | function(dx, dy) {} |
|
||||
| Point.js:4:1:4:25 | Point.p ... j = {}; | Point.js:4:23:4:24 | {} |
|
||||
| Point.js:8:1:8:26 | Point.f ... n() {}; | Point.js:8:13:8:25 | function() {} |
|
||||
sourceDecl
|
||||
| Point.js:18:5:18:10 | aPoint | Point.js:1:21:1:43 | functio ... , y) {} | aPoint |
|
||||
19
javascript/ql/test/library-tests/Externs/tests.ql
Normal file
19
javascript/ql/test/library-tests/Externs/tests.ql
Normal file
@@ -0,0 +1,19 @@
|
||||
import javascript
|
||||
|
||||
query predicate externalDecl_getName(ExternalDecl ed, string name) { name = ed.getName() }
|
||||
|
||||
query predicate externalDecl_getQualifiedName(ExternalDecl ed, string name) {
|
||||
name = ed.getQualifiedName()
|
||||
}
|
||||
|
||||
query predicate externalDecl(ExternalDecl decl) { any() }
|
||||
|
||||
query predicate externalTypedef(ExternalTypedef typ) { any() }
|
||||
|
||||
query predicate externalVarDecl_getInit(ExternalVarDecl decl, ASTNode init) {
|
||||
decl.getInit() = init
|
||||
}
|
||||
|
||||
query predicate sourceDecl(ExternalVarDecl v, ExternalType typeDecl, string qname) {
|
||||
qname = v.getQualifiedName() and typeDecl = v.getTypeTag().getTypeDeclaration()
|
||||
}
|
||||
Reference in New Issue
Block a user