JS: Benign test updates

This commit is contained in:
Asger F
2024-09-10 13:07:24 +02:00
parent 3d4287b7cc
commit e0ca1b0482
3 changed files with 4 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
legacyDataFlowDifference
| arrays.js:2:16:2:23 | "source" | arrays.js:58:8:58:13 | arr[0] | only flow with NEW data flow library |
flow
| arrays.js:2:16:2:23 | "source" | arrays.js:5:8:5:14 | obj.foo |
| arrays.js:2:16:2:23 | "source" | arrays.js:11:10:11:15 | arr[i] |
@@ -6,6 +7,7 @@ flow
| arrays.js:2:16:2:23 | "source" | arrays.js:16:23:16:23 | e |
| arrays.js:2:16:2:23 | "source" | arrays.js:20:8:20:16 | arr.pop() |
| arrays.js:2:16:2:23 | "source" | arrays.js:39:8:39:24 | arr4_spread.pop() |
| arrays.js:2:16:2:23 | "source" | arrays.js:58:8:58:13 | arr[0] |
| arrays.js:2:16:2:23 | "source" | arrays.js:61:10:61:10 | x |
| arrays.js:2:16:2:23 | "source" | arrays.js:65:10:65:10 | x |
| arrays.js:2:16:2:23 | "source" | arrays.js:69:10:69:10 | x |

View File

@@ -55,7 +55,7 @@
sink(ary); // OK - its the array itself, not an element.
});
sink(arr[0]); // OK - tuple like usage.
sink(arr[0]); // NOT OK
for (const x of arr) {
sink(x); // NOT OK

View File

@@ -28,7 +28,7 @@ function m3() {
function m4() {
const flowIntoArrayElement = mkSummary("Argument[0]", "ReturnValue.ArrayElement");
sink(flowIntoArrayElement(source()).pop()); // NOT OK
sink(flowIntoArrayElement(source())[0]); // NOT OK [INCONSISTENCY]
sink(flowIntoArrayElement(source())[0]); // NOT OK
sink(flowIntoArrayElement(source())[Math.random()]); // NOT OK
sink(flowIntoArrayElement(source()).prop); // OK
}