Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f8d3822

Browse files
committed
aggregate the tests in library-tests/TypeInference/AnalyzedModule into a single .ql file
1 parent 036187c commit f8d3822

10 files changed

Lines changed: 75 additions & 62 deletions

javascript/ql/test/library-tests/TypeInference/AnalyzedModule/AnalyzedModule_getAnExportedValue.expected

Lines changed: 0 additions & 21 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeInference/AnalyzedModule/AnalyzedModule_getAnExportedValue.ql

Lines changed: 0 additions & 4 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeInference/AnalyzedModule/AnalyzedModule_getAnExportsValue.expected

Lines changed: 0 additions & 11 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeInference/AnalyzedModule/AnalyzedModule_getAnExportsValue.ql

Lines changed: 0 additions & 4 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeInference/AnalyzedModule/AnalyzedModule_getExportsProperty.expected

Lines changed: 0 additions & 7 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeInference/AnalyzedModule/AnalyzedModule_getExportsProperty.ql

Lines changed: 0 additions & 4 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeInference/AnalyzedModule/AnalyzedModule_getModuleObject.expected

Lines changed: 0 additions & 7 deletions
This file was deleted.

javascript/ql/test/library-tests/TypeInference/AnalyzedModule/AnalyzedModule_getModuleObject.ql

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
analyzedModule_getAnExportedValue
2+
| amd2.js:1:1:6:0 | <toplevel> | default | amd2.js:1:1:6:0 | exports object of module amd2 | amd2 |
3+
| amd2.js:1:1:6:0 | <toplevel> | default | amd2.js:2:17:4:5 | object literal | amd2 |
4+
| amd2.js:1:1:6:0 | <toplevel> | foo | file://:0:0:0:0 | non-zero value | amd2 |
5+
| amd3.js:1:1:4:0 | <toplevel> | default | amd3.js:1:1:4:0 | exports object of module amd3 | amd3 |
6+
| amd3.js:1:1:4:0 | <toplevel> | foo | file://:0:0:0:0 | non-zero value | amd3 |
7+
| amd.js:1:1:6:0 | <toplevel> | default | amd.js:1:1:6:0 | exports object of module amd | amd |
8+
| amd.js:1:1:6:0 | <toplevel> | default | amd.js:2:12:4:5 | object literal | amd |
9+
| amd.js:1:1:6:0 | <toplevel> | foo | file://:0:0:0:0 | non-zero value | amd |
10+
| commonjs2.js:1:1:4:0 | <toplevel> | default | commonjs2.js:1:1:4:0 | exports object of module commonjs2 | commonjs2 |
11+
| commonjs2.js:1:1:4:0 | <toplevel> | default | commonjs2.js:1:18:3:1 | object literal | commonjs2 |
12+
| commonjs2.js:1:1:4:0 | <toplevel> | id | commonjs2.js:2:9:2:16 | method id | commonjs2 |
13+
| commonjs.js:1:1:3:0 | <toplevel> | default | commonjs.js:1:1:3:0 | exports object of module commonjs | commonjs |
14+
| commonjs.js:1:1:3:0 | <toplevel> | foo | commonjs.js:1:15:1:27 | anonymous function | commonjs |
15+
| commonjs.js:1:1:3:0 | <toplevel> | x | file://:0:0:0:0 | non-empty, non-numeric string | commonjs |
16+
| es6.js:1:1:7:0 | <toplevel> | default | file://:0:0:0:0 | true | es6 |
17+
| es6.js:1:1:7:0 | <toplevel> | default | m.js:1:16:3:1 | object literal | es6 |
18+
| es6.js:1:1:7:0 | <toplevel> | foo | es6.js:3:8:3:24 | function foo | es6 |
19+
| es6.js:1:1:7:0 | <toplevel> | x | file://:0:0:0:0 | non-empty, non-numeric string | es6 |
20+
| es6.js:1:1:7:0 | <toplevel> | z | file://:0:0:0:0 | non-zero value | es6 |
21+
| m.js:1:1:4:0 | <toplevel> | default | m.js:1:16:3:1 | object literal | m |
22+
| m.js:1:1:4:0 | <toplevel> | id | m.js:2:9:2:16 | method id | m |
23+
analyzedModule_getAnExportsValue
24+
| amd2.js:1:1:6:0 | <toplevel> | amd2 | amd2.js:1:1:6:0 | exports object of module amd2 |
25+
| amd2.js:1:1:6:0 | <toplevel> | amd2 | amd2.js:2:17:4:5 | object literal |
26+
| amd3.js:1:1:4:0 | <toplevel> | amd3 | amd3.js:1:1:4:0 | exports object of module amd3 |
27+
| amd.js:1:1:6:0 | <toplevel> | amd | amd.js:1:1:6:0 | exports object of module amd |
28+
| amd.js:1:1:6:0 | <toplevel> | amd | amd.js:2:12:4:5 | object literal |
29+
| commonjs2.js:1:1:4:0 | <toplevel> | commonjs2 | commonjs2.js:1:1:4:0 | exports object of module commonjs2 |
30+
| commonjs2.js:1:1:4:0 | <toplevel> | commonjs2 | commonjs2.js:1:18:3:1 | object literal |
31+
| commonjs.js:1:1:3:0 | <toplevel> | commonjs | commonjs.js:1:1:3:0 | exports object of module commonjs |
32+
| es6.js:1:1:7:0 | <toplevel> | es6 | es6.js:1:1:7:0 | exports object of module es6 |
33+
| m.js:1:1:4:0 | <toplevel> | m | m.js:1:1:4:0 | exports object of module m |
34+
| m.js:1:1:4:0 | <toplevel> | m | m.js:1:16:3:1 | object literal |
35+
analyzedModule_getExportsProperty
36+
| amd2.js:1:1:6:0 | <toplevel> | amd2 | property exports of module object of module amd2 |
37+
| amd3.js:1:1:4:0 | <toplevel> | amd3 | property exports of module object of module amd3 |
38+
| amd.js:1:1:6:0 | <toplevel> | amd | property exports of module object of module amd |
39+
| commonjs2.js:1:1:4:0 | <toplevel> | commonjs2 | property exports of module object of module commonjs2 |
40+
| commonjs.js:1:1:3:0 | <toplevel> | commonjs | property exports of module object of module commonjs |
41+
| es6.js:1:1:7:0 | <toplevel> | es6 | property exports of module object of module es6 |
42+
| m.js:1:1:4:0 | <toplevel> | m | property exports of module object of module m |
43+
analyzedModule_getModuleObject
44+
| amd2.js:1:1:6:0 | <toplevel> | amd2 | amd2.js:1:1:6:0 | module object of module amd2 |
45+
| amd3.js:1:1:4:0 | <toplevel> | amd3 | amd3.js:1:1:4:0 | module object of module amd3 |
46+
| amd.js:1:1:6:0 | <toplevel> | amd | amd.js:1:1:6:0 | module object of module amd |
47+
| commonjs2.js:1:1:4:0 | <toplevel> | commonjs2 | commonjs2.js:1:1:4:0 | module object of module commonjs2 |
48+
| commonjs.js:1:1:3:0 | <toplevel> | commonjs | commonjs.js:1:1:3:0 | module object of module commonjs |
49+
| es6.js:1:1:7:0 | <toplevel> | es6 | es6.js:1:1:7:0 | module object of module es6 |
50+
| m.js:1:1:4:0 | <toplevel> | m | m.js:1:1:4:0 | module object of module m |
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import javascript
2+
3+
query predicate analyzedModule_getAnExportedValue(
4+
AnalyzedModule m, string n, AbstractValue val, string name
5+
) {
6+
val = m.getAnExportedValue(n) and
7+
name = m.getName()
8+
}
9+
10+
query predicate analyzedModule_getAnExportsValue(AnalyzedModule m, string name, AbstractValue val) {
11+
m.getName() = name and
12+
m.getAnExportsValue() = val
13+
}
14+
15+
query predicate analyzedModule_getExportsProperty(
16+
AnalyzedModule m, string name, AbstractProperty prop
17+
) {
18+
name = m.getName() and prop = m.getExportsProperty()
19+
}
20+
21+
query predicate analyzedModule_getModuleObject(
22+
AnalyzedModule m, string name, AbstractModuleObject mod
23+
) {
24+
name = m.getName() and mod = m.getModuleObject()
25+
}

0 commit comments

Comments
 (0)