Skip to content

Commit a8c3cb2

Browse files
esbenaStephan Brandauer
authored andcommitted
improve feature tests with more cases
1 parent 86b2b79 commit a8c3cb2

4 files changed

Lines changed: 84 additions & 6 deletions

File tree

javascript/ql/experimental/adaptivethreatmodeling/test/generic_feature_testing/FeatureValue.expected

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
| test.html:2:61:2:68 | endpoint | ParameterAccessPathSimpleFromArgumentTraversal | 0 |
2+
| test.html:2:61:2:68 | endpoint | argumentIndex | 0 |
3+
| test.html:2:61:2:68 | endpoint | calleeAccessPath | |
4+
| test.html:2:61:2:68 | endpoint | calleeAccessPathSimpleFromArgumentTraversal | $event.target.files.item |
5+
| test.html:2:61:2:68 | endpoint | calleeAccessPathWithStructuralInfo | |
6+
| test.html:2:61:2:68 | endpoint | calleeName | item |
17
| test.js:2:7:2:14 | endpoint | ParameterAccessPathSimpleFromArgumentTraversal | 0 |
28
| test.js:2:7:2:14 | endpoint | argumentIndex | 0 |
39
| test.js:2:7:2:14 | endpoint | calleeAccessPath | |
@@ -27,3 +33,35 @@
2733
| test.js:7:17:7:24 | endpoint | calleeAccessPath | |
2834
| test.js:7:17:7:24 | endpoint | calleeAccessPathSimpleFromArgumentTraversal | o.m |
2935
| test.js:7:17:7:24 | endpoint | calleeAccessPathWithStructuralInfo | |
36+
| test.js:8:11:8:18 | endpoint | ParameterAccessPathSimpleFromArgumentTraversal | ? |
37+
| test.js:8:11:8:18 | endpoint | calleeAccessPath | |
38+
| test.js:8:11:8:18 | endpoint | calleeAccessPathSimpleFromArgumentTraversal | F |
39+
| test.js:8:11:8:18 | endpoint | calleeAccessPathWithStructuralInfo | |
40+
| test.js:9:17:9:24 | endpoint | ParameterAccessPathSimpleFromArgumentTraversal | 0 |
41+
| test.js:9:17:9:24 | endpoint | argumentIndex | 0 |
42+
| test.js:9:17:9:24 | endpoint | calleeAccessPath | |
43+
| test.js:9:17:9:24 | endpoint | calleeAccessPathSimpleFromArgumentTraversal | o.m().m().m |
44+
| test.js:9:17:9:24 | endpoint | calleeAccessPathWithStructuralInfo | |
45+
| test.js:9:17:9:24 | endpoint | calleeName | m |
46+
| test.js:10:9:10:16 | endpoint | ParameterAccessPathSimpleFromArgumentTraversal | 0 |
47+
| test.js:10:9:10:16 | endpoint | argumentIndex | 0 |
48+
| test.js:10:9:10:16 | endpoint | calleeAccessPath | |
49+
| test.js:10:9:10:16 | endpoint | calleeAccessPathSimpleFromArgumentTraversal | f() |
50+
| test.js:10:9:10:16 | endpoint | calleeAccessPathWithStructuralInfo | |
51+
| test.js:11:12:11:19 | endpoint | ParameterAccessPathSimpleFromArgumentTraversal | 0 |
52+
| test.js:11:12:11:19 | endpoint | argumentIndex | 0 |
53+
| test.js:11:12:11:19 | endpoint | calleeAccessPath | |
54+
| test.js:11:12:11:19 | endpoint | calleeAccessPathSimpleFromArgumentTraversal | o.?.m |
55+
| test.js:11:12:11:19 | endpoint | calleeAccessPathWithStructuralInfo | |
56+
| test.js:11:12:11:19 | endpoint | calleeName | m |
57+
| test.js:12:16:12:23 | endpoint | ParameterAccessPathSimpleFromArgumentTraversal | 0 |
58+
| test.js:12:16:12:23 | endpoint | argumentIndex | 0 |
59+
| test.js:12:16:12:23 | endpoint | calleeAccessPath | |
60+
| test.js:12:16:12:23 | endpoint | calleeAccessPathSimpleFromArgumentTraversal | o.m.?.p.m |
61+
| test.js:12:16:12:23 | endpoint | calleeAccessPathWithStructuralInfo | |
62+
| test.js:12:16:12:23 | endpoint | calleeName | m |
63+
| test.js:13:15:13:22 | endpoint | ParameterAccessPathSimpleFromArgumentTraversal | 0 |
64+
| test.js:13:15:13:22 | endpoint | argumentIndex | 0 |
65+
| test.js:13:15:13:22 | endpoint | calleeAccessPath | |
66+
| test.js:13:15:13:22 | endpoint | calleeAccessPathSimpleFromArgumentTraversal | (await p) |
67+
| test.js:13:15:13:22 | endpoint | calleeAccessPathWithStructuralInfo | |

javascript/ql/experimental/adaptivethreatmodeling/test/generic_feature_testing/NonTotalFeature.expected

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
| test.html:2:61:2:68 | endpoint | calleeApiName |
2+
| test.html:2:61:2:68 | endpoint | enclosingFunctionBody |
3+
| test.html:2:61:2:68 | endpoint | enclosingFunctionName |
4+
| test.html:2:61:2:68 | endpoint | receiverName |
15
| test.js:2:7:2:14 | endpoint | calleeApiName |
26
| test.js:2:7:2:14 | endpoint | enclosingFunctionBody |
37
| test.js:2:7:2:14 | endpoint | enclosingFunctionName |
@@ -29,3 +33,31 @@
2933
| test.js:7:17:7:24 | endpoint | enclosingFunctionBody |
3034
| test.js:7:17:7:24 | endpoint | enclosingFunctionName |
3135
| test.js:7:17:7:24 | endpoint | receiverName |
36+
| test.js:8:11:8:18 | endpoint | argumentIndex |
37+
| test.js:8:11:8:18 | endpoint | calleeApiName |
38+
| test.js:8:11:8:18 | endpoint | calleeName |
39+
| test.js:8:11:8:18 | endpoint | enclosingFunctionBody |
40+
| test.js:8:11:8:18 | endpoint | enclosingFunctionName |
41+
| test.js:8:11:8:18 | endpoint | receiverName |
42+
| test.js:9:17:9:24 | endpoint | calleeApiName |
43+
| test.js:9:17:9:24 | endpoint | enclosingFunctionBody |
44+
| test.js:9:17:9:24 | endpoint | enclosingFunctionName |
45+
| test.js:9:17:9:24 | endpoint | receiverName |
46+
| test.js:10:9:10:16 | endpoint | calleeApiName |
47+
| test.js:10:9:10:16 | endpoint | calleeName |
48+
| test.js:10:9:10:16 | endpoint | enclosingFunctionBody |
49+
| test.js:10:9:10:16 | endpoint | enclosingFunctionName |
50+
| test.js:10:9:10:16 | endpoint | receiverName |
51+
| test.js:11:12:11:19 | endpoint | calleeApiName |
52+
| test.js:11:12:11:19 | endpoint | enclosingFunctionBody |
53+
| test.js:11:12:11:19 | endpoint | enclosingFunctionName |
54+
| test.js:11:12:11:19 | endpoint | receiverName |
55+
| test.js:12:16:12:23 | endpoint | calleeApiName |
56+
| test.js:12:16:12:23 | endpoint | enclosingFunctionBody |
57+
| test.js:12:16:12:23 | endpoint | enclosingFunctionName |
58+
| test.js:12:16:12:23 | endpoint | receiverName |
59+
| test.js:13:15:13:22 | endpoint | calleeApiName |
60+
| test.js:13:15:13:22 | endpoint | calleeName |
61+
| test.js:13:15:13:22 | endpoint | enclosingFunctionBody |
62+
| test.js:13:15:13:22 | endpoint | enclosingFunctionName |
63+
| test.js:13:15:13:22 | endpoint | receiverName |
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="form-group">
2+
<input (change)="restoreBackup($event.target.files.item(endpoint))" />
3+
</div>
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
(function(){
1+
(async function(){
22
f(endpoint);
3-
f({p: endpoint})
4-
f({p: {q: endpoint}})
3+
f({p: endpoint});
4+
f({p: {q: endpoint}});
55
o.m(endpoint);
6-
o.m({p: endpoint})
7-
o.m({p: {q: endpoint}})
8-
6+
o.m({p: endpoint});
7+
o.m({p: {q: endpoint}});
8+
new F(endpoint);
9+
o.m().m().m(endpoint);
10+
f()(endpoint);
11+
o[x].m(endpoint);
12+
o.m[x].p.m(endpoint);
13+
(await p)(endpoint);
914
});

0 commit comments

Comments
 (0)