JS: format test case (update expected output)

This commit is contained in:
Esben Sparre Andreasen
2019-02-25 15:55:44 +01:00
parent 1150f4c02b
commit 65fb1423b7
5 changed files with 36 additions and 30 deletions

View File

@@ -1,14 +1,14 @@
| method-calls.js:2:11:7:2 | {\\n\\t\\tm1: ... }; }\\n\\t} |
| method-calls.js:11:23:11:24 | {} |
| method-calls.js:16:11:16:12 | {} |
| method-calls.js:23:11:23:17 | {m: f1} |
| method-calls.js:27:11:27:17 | {m: f2} |
| method-calls.js:32:12:32:18 | {m: f3} |
| method-calls.js:36:15:36:21 | {m: f4} |
| method-calls.js:42:16:42:28 | {m: () => 42} |
| method-calls.js:46:17:46:29 | {m: () => 42} |
| method-calls.js:50:16:50:28 | {m: () => 42} |
| method-calls.js:53:16:53:28 | {m: () => 42} |
| method-calls.js:25:11:25:17 | {m: f1} |
| method-calls.js:29:11:29:17 | {m: f2} |
| method-calls.js:34:12:34:18 | {m: f3} |
| method-calls.js:38:15:38:21 | {m: f4} |
| method-calls.js:46:16:46:28 | {m: () => 42} |
| method-calls.js:50:17:50:29 | {m: () => 42} |
| method-calls.js:54:16:54:28 | {m: () => 42} |
| method-calls.js:57:16:57:28 | {m: () => 42} |
| tst.js:3:18:3:19 | {} |
| tst.js:4:18:4:36 | { f: function(){} } |
| tst.js:5:18:5:34 | { [unknown]: 42 } |

View File

@@ -2,14 +2,14 @@
| method-calls.js:2:11:7:2 | {\\n\\t\\tm1: ... }; }\\n\\t} | m2 |
| method-calls.js:2:11:7:2 | {\\n\\t\\tm1: ... }; }\\n\\t} | m3 |
| method-calls.js:2:11:7:2 | {\\n\\t\\tm1: ... }; }\\n\\t} | m4 |
| method-calls.js:23:11:23:17 | {m: f1} | m |
| method-calls.js:27:11:27:17 | {m: f2} | m |
| method-calls.js:32:12:32:18 | {m: f3} | m |
| method-calls.js:36:15:36:21 | {m: f4} | m |
| method-calls.js:42:16:42:28 | {m: () => 42} | m |
| method-calls.js:46:17:46:29 | {m: () => 42} | m |
| method-calls.js:50:16:50:28 | {m: () => 42} | m |
| method-calls.js:53:16:53:28 | {m: () => 42} | m |
| method-calls.js:25:11:25:17 | {m: f1} | m |
| method-calls.js:29:11:29:17 | {m: f2} | m |
| method-calls.js:34:12:34:18 | {m: f3} | m |
| method-calls.js:38:15:38:21 | {m: f4} | m |
| method-calls.js:46:16:46:28 | {m: () => 42} | m |
| method-calls.js:50:17:50:29 | {m: () => 42} | m |
| method-calls.js:54:16:54:28 | {m: () => 42} | m |
| method-calls.js:57:16:57:28 | {m: () => 42} | m |
| tst.js:4:18:4:36 | { f: function(){} } | f |
| tst.js:38:18:38:26 | { p: 42 } | p |
| tst.js:42:18:42:33 | { p: 42, q: 42 } | p |

View File

@@ -1,12 +1,12 @@
| method-calls.js:8:2:8:8 | o1.m1() | object |
| method-calls.js:9:2:9:8 | o1.m2() | object |
| method-calls.js:12:2:12:7 | o.m3() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:19:2:19:7 | o2.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:23:11:23:21 | {m: f1}.m() | object |
| method-calls.js:28:11:28:16 | o2.m() | object |
| method-calls.js:32:11:32:23 | ({m: f3}).m() | object |
| method-calls.js:37:11:37:16 | o4.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:43:12:43:16 | o.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:21:2:21:7 | o2.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:25:11:25:21 | {m: f1}.m() | object |
| method-calls.js:30:11:30:16 | o2.m() | object |
| method-calls.js:34:11:34:23 | ({m: f3}).m() | object |
| method-calls.js:41:11:41:16 | o4.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:47:12:47:16 | o.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:51:12:51:16 | o.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:54:12:54:16 | o.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:55:12:55:16 | o.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |
| method-calls.js:60:12:60:16 | o.m() | boolean, class, date, function, null, number, object, regular expression,string or undefined |

View File

@@ -1,4 +1,4 @@
| method-calls.js:23:11:23:21 | {m: f1}.m() | method-calls.js:24:2:24:3 | v1 | method-calls.js:22:23:22:24 | object literal |
| method-calls.js:28:11:28:16 | o2.m() | method-calls.js:29:2:29:3 | v2 | method-calls.js:26:23:26:24 | object literal |
| method-calls.js:32:11:32:23 | ({m: f3}).m() | method-calls.js:33:2:33:3 | v3 | method-calls.js:31:23:31:24 | object literal |
| method-calls.js:37:11:37:16 | o4.m() | method-calls.js:38:2:38:3 | v4 | file://:0:0:0:0 | indefinite value (call) |
| method-calls.js:25:11:25:21 | {m: f1}.m() | method-calls.js:26:2:26:3 | v1 | method-calls.js:24:23:24:24 | object literal |
| method-calls.js:30:11:30:16 | o2.m() | method-calls.js:31:2:31:3 | v2 | method-calls.js:28:23:28:24 | object literal |
| method-calls.js:34:11:34:23 | ({m: f3}).m() | method-calls.js:35:2:35:3 | v3 | method-calls.js:33:23:33:24 | object literal |
| method-calls.js:41:11:41:16 | o4.m() | method-calls.js:42:2:42:3 | v4 | file://:0:0:0:0 | indefinite value (call) |

View File

@@ -15,7 +15,9 @@
var o2 = {};
o2.m = function() { return {}; };
// not analyzed precisely: `m` may be in the prototype since `m` is not in the initializer, and we do not attempt to reason flow sensitively beyond that at the moment
// not analyzed precisely: `m` may be in the prototype since `m`
// is not in the initializer, and we do not attempt to reason flow
// sensitively beyond that at the moment
o2.m();
});
(function(){
@@ -34,7 +36,9 @@
function f4(){return {};}
var { o4 } = {m: f4};
var v4 = o4.m(); // not analyzed precisely: o4 is from a destructuring assignment (and is even `undefined` in this case
// not analyzed precisely: o4 is from a destructuring assignment
// (and it is even `undefined` in this case)
var v4 = o4.m();
v4 === true;
});
@@ -51,7 +55,9 @@
var v3 = o.m(); // not analyzed precisely: `o.m` may be `unknown`
})({m: unknown});
(function(o = {m: () => 42}){
var v4 = o.m(); // not analyzed precisely: we only support unique receivers at the moment
// not analyzed precisely: we only support unique receivers at
// the moment
var v4 = o.m();
})({m: () => true});
});