Skip to content

Commit 81723ab

Browse files
committed
JS: Update GlobalAccessPaths test
1 parent 3ec9588 commit 81723ab

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

javascript/ql/test/library-tests/GlobalAccessPaths/GlobalAccessPaths.expected

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
test_fromReference
1+
test_getAReferenceTo
22
| other_ns.js:2:11:2:12 | ns | NS |
33
| other_ns.js:3:3:3:4 | ns | NS |
44
| other_ns.js:3:3:3:8 | ns.foo | NS.foo |
@@ -39,6 +39,7 @@ test_fromReference
3939
| test.js:12:19:12:25 | foo.bar | foo.bar |
4040
| test.js:13:7:13:15 | something | something |
4141
| test.js:14:5:14:23 | notUnique | bar.baz |
42+
| test.js:14:5:14:23 | notUnique = bar.baz | bar.baz |
4243
| test.js:14:17:14:19 | bar | bar |
4344
| test.js:14:17:14:23 | bar.baz | bar.baz |
4445
| test.js:22:11:22:12 | ns | NS |
@@ -54,10 +55,11 @@ test_fromReference
5455
| test.js:33:9:33:16 | bar = {} | foo.bar |
5556
| test.js:33:22:33:24 | foo | foo |
5657
| test.js:39:3:39:20 | lazyInit | foo.bar |
58+
| test.js:39:3:39:20 | lazyInit = foo.bar | foo.bar |
5759
| test.js:39:14:39:16 | foo | foo |
5860
| test.js:39:14:39:20 | foo.bar | foo.bar |
5961
| test.js:40:3:40:10 | lazyInit | foo.bar |
60-
test_fromRhs
62+
test_getAnAssignmentTo
6163
| other_ns.js:4:9:4:16 | NS \|\| {} | NS |
6264
| other_ns.js:6:12:6:13 | {} | Conflict |
6365
| test.js:1:1:20:1 | functio ... ss {}\\n} | f |
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import javascript
22

3-
query string test_fromReference(DataFlow::Node node) {
4-
result = GlobalAccessPath::fromReference(node)
3+
query string test_getAReferenceTo(DataFlow::Node node) {
4+
node = AccessPath::getAReferenceTo(result)
55
}
66

7-
query string test_fromRhs(DataFlow::Node node) { result = GlobalAccessPath::fromRhs(node) }
7+
query string test_getAnAssignmentTo(DataFlow::Node node) {
8+
node = AccessPath::getAnAssignmentTo(result)
9+
}
810

9-
query string test_assignedUnique() { GlobalAccessPath::isAssignedInUniqueFile(result) }
11+
query string test_assignedUnique() { AccessPath::isAssignedInUniqueFile(result) }

0 commit comments

Comments
 (0)