Skip to content

Commit 44a270a

Browse files
committed
JS: Add test
1 parent 3347b7d commit 44a270a

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
missingBasicBlock
2+
basicBlock
3+
| tst.js:1:1:1:0 | this | tst.js:1:1:1:0 | entry node of <toplevel> |
4+
| tst.js:1:16:1:15 | this | tst.js:1:16:1:15 | entry node of () {} |
5+
| tst.js:3:7:3:6 | this | tst.js:3:7:3:6 | entry node of () {\\n ... ;\\n } |
6+
| tst.js:7:7:7:6 | this | tst.js:7:7:7:6 | entry node of () {\\n ... ;\\n } |
7+
| tst.js:13:14:13:13 | this | tst.js:13:14:13:13 | entry node of () {} |
8+
| tst.js:15:13:15:12 | this | tst.js:15:13:15:12 | entry node of () {\\n ... ;\\n } |
9+
| tst.js:16:10:16:9 | this | tst.js:16:10:16:9 | entry node of functio ... } |
10+
| tst.js:21:13:21:12 | this | tst.js:21:13:21:12 | entry node of () {\\n ... ;\\n } |
11+
| tst.js:23:10:23:9 | this | tst.js:23:10:23:9 | entry node of functio ... } |
12+
| tst.js:28:13:28:12 | this | tst.js:28:13:28:12 | entry node of () {\\n ... ;\\n } |
13+
| tst.js:29:9:29:8 | this | tst.js:29:9:29:8 | entry node of functio ... } |
14+
| tst.js:35:13:35:12 | this | tst.js:35:13:35:12 | entry node of () {\\n ... ;\\n } |
15+
| tst.js:36:10:36:9 | this | tst.js:36:10:36:9 | entry node of functio ... } |
16+
| tst.js:37:14:37:13 | this | tst.js:37:14:37:13 | entry node of functio ... } |
17+
| tst.js:45:14:45:13 | this | tst.js:45:14:45:13 | entry node of () {} |
18+
| tst.js:47:13:47:12 | this | tst.js:47:13:47:12 | entry node of () {\\n ... ;\\n } |
19+
| tst.js:48:10:48:9 | this | tst.js:48:10:48:9 | entry node of functio ... } |
20+
| tst.js:55:15:55:14 | this | tst.js:55:15:55:14 | entry node of () {} |
21+
| tst.js:57:13:57:12 | this | tst.js:57:13:57:12 | entry node of () {\\n ... ;\\n } |
22+
| tst.js:59:10:59:9 | this | tst.js:59:10:59:9 | entry node of functio ... } |
23+
| tst.js:66:13:66:12 | this | tst.js:66:13:66:12 | entry node of () {} |
24+
| tst.js:68:13:68:12 | this | tst.js:68:13:68:12 | entry node of () {\\n ... ;\\n } |
25+
| tst.js:69:15:69:14 | this | tst.js:69:15:69:14 | entry node of functio ... } |
26+
| tst.js:74:13:74:12 | this | tst.js:74:13:74:12 | entry node of () {\\n ... )\\n } |
27+
| tst.js:76:10:76:9 | this | tst.js:76:10:76:9 | entry node of functio ... } |
28+
| tst.js:83:22:83:21 | this | tst.js:83:22:83:21 | entry node of () {} |
29+
| tst.js:85:13:85:12 | this | tst.js:85:13:85:12 | entry node of () {\\n ... `\\n } |
30+
| tst.js:87:21:87:20 | this | tst.js:87:21:87:20 | entry node of functio ... } |
31+
| tst.js:95:13:95:12 | this | tst.js:95:13:95:12 | entry node of () {\\n ... ;\\n } |
32+
| tst.js:96:9:96:8 | this | tst.js:96:9:96:8 | entry node of functio ... } |
33+
| tst.js:105:20:105:19 | this | tst.js:105:20:105:19 | entry node of () {} |
34+
| tst.js:107:13:107:12 | this | tst.js:107:13:107:12 | entry node of () {\\n ... ;\\n } |
35+
| tst.js:108:18:108:17 | this | tst.js:108:18:108:17 | entry node of functio ... } |
36+
| tst.js:113:13:113:12 | this | tst.js:113:13:113:12 | entry node of () {\\n ... ;\\n } |
37+
| tst.js:114:21:114:20 | this | tst.js:114:21:114:20 | entry node of functio ... } |
38+
| tst.js:119:13:119:12 | this | tst.js:119:13:119:12 | entry node of () {\\n ... ;\\n } |
39+
| tst.js:120:27:120:26 | this | tst.js:120:27:120:26 | entry node of functio ... } |
40+
| tst.js:128:16:128:15 | this | tst.js:128:16:128:15 | entry node of () {} |
41+
| tst.js:130:13:130:12 | this | tst.js:130:13:130:12 | entry node of () {\\n ... ;\\n } |
42+
| tst.js:131:18:131:17 | this | tst.js:131:18:131:17 | entry node of functio ... } |
43+
| tst.js:136:13:136:12 | this | tst.js:136:13:136:12 | entry node of () {\\n ... ;\\n } |
44+
| tst.js:137:21:137:20 | this | tst.js:137:21:137:20 | entry node of functio ... } |
45+
| tst.js:142:13:142:12 | this | tst.js:142:13:142:12 | entry node of () {\\n ... ;\\n } |
46+
| tst.js:143:23:143:22 | this | tst.js:143:23:143:22 | entry node of functio ... } |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import javascript
2+
3+
query predicate missingBasicBlock(DataFlow::ThisNode node) {
4+
not exists(node.getBasicBlock())
5+
}
6+
7+
query BasicBlock basicBlock(DataFlow::ThisNode node) {
8+
result = node.getBasicBlock()
9+
}

0 commit comments

Comments
 (0)