File tree Expand file tree Collapse file tree
javascript/ql/test/library-tests/TypeTracking Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,9 +7,20 @@ test_Connection
77| tst.js:10:5:10:19 | this.connection |
88| tst.js:15:10:15:49 | api.cha ... ction() |
99| tst.js:18:7:18:21 | getConnection() |
10+ | tst.js:30:9:30:23 | getConnection() |
11+ | tst.js:39:7:39:21 | getConnection() |
12+ | tst.js:47:7:47:21 | getConnection() |
1013test_DataCallback
1114| tst.js:9:11:9:12 | cb |
1215| tst.js:20:1:22:1 | functio ... ata);\\n} |
16+ | tst.js:29:26:29:27 | cb |
17+ | tst.js:32:17:32:26 | data => {} |
18+ | tst.js:37:10:37:19 | data => {} |
19+ | tst.js:39:32:39:45 | getDataCurry() |
20+ | tst.js:44:19:44:20 | cb |
21+ | tst.js:47:32:47:60 | identit ... llback) |
1322test_DataValue
1423| tst.js:20:18:20:21 | data |
1524| tst.js:24:19:24:22 | data |
25+ | tst.js:32:17:32:20 | data |
26+ | tst.js:37:10:37:13 | data |
Original file line number Diff line number Diff line change @@ -7,9 +7,20 @@ connection
77| type tracker with call steps | tst.js:10:5:10:19 | this.connection |
88| type tracker without call steps | tst.js:15:10:15:49 | api.cha ... ction() |
99| type tracker without call steps | tst.js:18:7:18:21 | getConnection() |
10+ | type tracker without call steps | tst.js:30:9:30:23 | getConnection() |
11+ | type tracker without call steps | tst.js:39:7:39:21 | getConnection() |
12+ | type tracker without call steps | tst.js:47:7:47:21 | getConnection() |
1013dataCallback
1114| tst.js:9:11:9:12 | cb |
1215| tst.js:20:1:22:1 | functio ... ata);\\n} |
16+ | tst.js:29:26:29:27 | cb |
17+ | tst.js:32:17:32:26 | data => {} |
18+ | tst.js:37:10:37:19 | data => {} |
19+ | tst.js:39:32:39:45 | getDataCurry() |
20+ | tst.js:44:19:44:20 | cb |
21+ | tst.js:47:32:47:60 | identit ... llback) |
1322dataValue
1423| tst.js:20:18:20:21 | data |
1524| tst.js:24:19:24:22 | data |
25+ | tst.js:32:17:32:20 | data |
26+ | tst.js:37:10:37:13 | data |
Original file line number Diff line number Diff line change @@ -23,3 +23,29 @@ function useData(data) {
2323
2424function useData2 ( data ) {
2525}
26+
27+
28+ // Test tracking of callback into function
29+ function getDataIndirect ( cb ) {
30+ new C ( getConnection ( ) ) . getData ( cb ) ;
31+ }
32+ getDataIndirect ( data => { } ) ;
33+ getDataIndirect ( ) ; // suppress precision gains from single-call special case
34+
35+ // Test tracking of callback out of function
36+ function getDataCurry ( ) {
37+ return data => { } ;
38+ }
39+ new C ( getConnection ( ) ) . getData ( getDataCurry ( ) ) ;
40+ getDataCurry ( ) ; // suppress precision gains from single-call special case
41+
42+
43+ // Test call/return matching of callback tracking
44+ function identity ( cb ) {
45+ return cb ;
46+ }
47+ new C ( getConnection ( ) ) . getData ( identity ( realGetDataCallback ) ) ;
48+ identity ( fakeGetDataCallback ) ;
49+
50+ function realGetDataCallback ( data ) { } // not found due to missing summarization
51+ function fakeGetDataCallback ( notData ) { } // should not be found
You can’t perform that action at this time.
0 commit comments