JS: Add some tests for missing handling of dynamic args in flow summaries

This commit is contained in:
Asger F
2024-08-12 14:08:43 +02:00
parent c04f0beb8a
commit 5c7e623c47
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
| library-tests/FlowSummary/tst.js:278 | expected an alert, but found none | NOT OK | ConsistencyConfig |
| library-tests/FlowSummary/tst.js:282 | expected an alert, but found none | NOT OK | ConsistencyConfig |
| library-tests/FlowSummary/tst.js:283 | expected an alert, but found none | NOT OK | ConsistencyConfig |
| library-tests/FlowSummary/tst.js:286 | expected an alert, but found none | NOT OK | ConsistencyConfig |
| library-tests/FlowSummary/tst.js:287 | expected an alert, but found none | NOT OK | ConsistencyConfig |
| library-tests/FlowSummary/tst.js:290 | expected an alert, but found none | NOT OK | ConsistencyConfig |
| library-tests/FlowSummary/tst.js:291 | expected an alert, but found none | NOT OK | ConsistencyConfig |

View File

@@ -268,3 +268,26 @@ function m17() {
sink(value); // NOT OK
}
}
function m18() {
const staticParam0 = mkSummary("Argument[0]", "ReturnValue");
const staticParam1 = mkSummary("Argument[1]", "ReturnValue");
const dynamicParam0 = mkSummary("Argument[0..]", "ReturnValue");
const dynamicParam1 = mkSummary("Argument[1..]", "ReturnValue");
sink(staticParam0(...source())); // NOT OK
sink(staticParam0("safe", ...source())); // OK
sink(staticParam0(source(), ...["safe"])); // NOT OK
sink(staticParam1(...source())); // NOT OK
sink(staticParam1("safe", ...source())); // NOT OK
sink(staticParam1(source(), ...["safe"])); // OK
sink(dynamicParam0(...source())); // NOT OK
sink(dynamicParam0("safe", ...source())); // NOT OK
sink(dynamicParam0(source(), ...["safe"])); // NOT OK
sink(dynamicParam1(...source())); // NOT OK
sink(dynamicParam1("safe", ...source())); // NOT OK
sink(dynamicParam1(source(), ...["safe"])); // OK
}