Skip to content

Commit 4c66f50

Browse files
committed
JS: More tests
1 parent fec2837 commit 4c66f50

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

javascript/ql/test/library-tests/CallGraphs/AnnotatedTest/Test.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ accessorCall
1010
| accessors.js:29:1:29:3 | C.f | accessors.js:22:15:22:20 | (x) {} |
1111
| accessors.js:41:1:41:9 | new D().f | accessors.js:34:8:34:12 | () {} |
1212
| accessors.js:44:1:44:9 | new D().f | accessors.js:37:8:37:13 | (x) {} |
13+
| accessors.js:48:1:48:5 | obj.f | accessors.js:5:8:5:12 | () {} |
14+
| accessors.js:51:1:51:3 | C.f | accessors.js:19:15:19:19 | () {} |
15+
| accessors.js:54:1:54:9 | new D().f | accessors.js:34:8:34:12 | () {} |

javascript/ql/test/library-tests/CallGraphs/AnnotatedTest/accessors.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,13 @@ new D().f;
4242

4343
/** callsAccessor:D.f.set */
4444
new D().f = 1;
45+
46+
// Avoid regular calls being seen as calls to the accessor itself
47+
/** calls:NONE */
48+
obj.f();
49+
50+
/** calls:NONE */
51+
C.f();
52+
53+
/** calls:NONE */
54+
new D().f();

0 commit comments

Comments
 (0)