break-locations-var-init-expected.txt 5.61 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Tests breakable locations in variable initializations.

Running test: testBreakLocations

Running test: testStepInto

function testFunction() {
  var obj1 = |_|{a : 1};
  var arr1 = |_|[1];
  var promise = |_|Promise.|C|resolve(1).|C|then(x => x |_|* 2|R|).|C|then(x => x |_|/ 2|R|);
  |_|Promise.|C|resolve(1).|C|then(x => x |_|* 2|R|).|C|then(x => x |_|/ 2|R|);
  |_|promise = Promise.|C|resolve(1).|C|then(x => x |_|* 2|R|).|C|then(x => x |_|/ 2|R|);
  var a = |_|1;
  const x = |_|(a = 20);
  var y = |_|(a = 100);
  var z = |_|x + (a = 1) + (a = 2) + (a = 3) + |C|f();
  function f() {
18
    for (let { |_|x, |_|y } = |_|{ x: 0, y: 1 }; y |_|> 0; --|_|y) { let z = |_|x + y; }
19
  |R|}
20
  var b = obj1.|_|a;
21 22
  |_|(async function asyncF() {
    let r = |_|await Promise.|C|resolve(42);
23
    |_|return r;|R|
24
  |R|})|C|();
25 26
  |_|return promise;|R|
}
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91

(anonymous) (expr.js:0:0)


testFunction (test.js:2:13)
(anonymous) (expr.js:0:0)
function testFunction() {
  var obj1 = #{a : 1};
  var arr1 = [1];

testFunction (test.js:3:13)
(anonymous) (expr.js:0:0)
  var obj1 = {a : 1};
  var arr1 = #[1];
  var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);

testFunction (test.js:4:16)
(anonymous) (expr.js:0:0)
  var arr1 = [1];
  var promise = #Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  Promise.resolve(1).then(x => x * 2).then(x => x / 2);

testFunction (test.js:5:2)
(anonymous) (expr.js:0:0)
  var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  #Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);

testFunction (test.js:6:2)
(anonymous) (expr.js:0:0)
  Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  #promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  var a = 1;

testFunction (test.js:7:10)
(anonymous) (expr.js:0:0)
  promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  var a = #1;
  const x = (a = 20);

testFunction (test.js:8:12)
(anonymous) (expr.js:0:0)
  var a = 1;
  const x = #(a = 20);
  var y = (a = 100);

testFunction (test.js:9:10)
(anonymous) (expr.js:0:0)
  const x = (a = 20);
  var y = #(a = 100);
  var z = x + (a = 1) + (a = 2) + (a = 3) + f();

testFunction (test.js:10:10)
(anonymous) (expr.js:0:0)
  var y = (a = 100);
  var z = #x + (a = 1) + (a = 2) + (a = 3) + f();
  function f() {

f (test.js:12:24)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
  function f() {
    for (let { x, y } = #{ x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
  }

92 93 94 95 96 97 98 99 100 101 102 103 104 105
f (test.js:12:15)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
  function f() {
    for (let { #x, y } = { x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
  }

f (test.js:12:18)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
  function f() {
    for (let { x, #y } = { x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
  }

106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
f (test.js:12:42)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
  function f() {
    for (let { x, y } = { x: 0, y: 1 }; y #> 0; --y) { let z = x + y; }
  }

f (test.js:12:62)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
  function f() {
    for (let { x, y } = { x: 0, y: 1 }; y > 0; --y) { let z = #x + y; }
  }

f (test.js:12:49)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
  function f() {
    for (let { x, y } = { x: 0, y: 1 }; y > 0; --#y) { let z = x + y; }
  }

f (test.js:12:42)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
  function f() {
    for (let { x, y } = { x: 0, y: 1 }; y #> 0; --y) { let z = x + y; }
  }

f (test.js:13:2)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
    for (let { x, y } = { x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
  #}
  var b = obj1.a;

141
testFunction (test.js:14:15)
142 143
(anonymous) (expr.js:0:0)
  }
144
  var b = obj1.#a;
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
  (async function asyncF() {

testFunction (test.js:15:2)
(anonymous) (expr.js:0:0)
  var b = obj1.a;
  #(async function asyncF() {
    let r = await Promise.resolve(42);

asyncF (test.js:16:12)
testFunction (test.js:18:4)
(anonymous) (expr.js:0:0)
  (async function asyncF() {
    let r = #await Promise.resolve(42);
    return r;

asyncF (test.js:17:4)
    let r = await Promise.resolve(42);
    #return r;
  })();

165 166 167 168
asyncF (test.js:17:13)
    let r = await Promise.resolve(42);
    return r;#
  })();
169

170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
(anonymous) (test.js:4:64)
  var arr1 = [1];
  var promise = Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
  Promise.resolve(1).then(x => x * 2).then(x => x / 2);

(anonymous) (test.js:4:67)
  var arr1 = [1];
  var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
  Promise.resolve(1).then(x => x * 2).then(x => x / 2);

(anonymous) (test.js:5:50)
  var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
  promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);

(anonymous) (test.js:5:53)
  var promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
  promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2);

(anonymous) (test.js:6:60)
  Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  promise = Promise.resolve(1).then(x => x * 2).then(x => x #/ 2);
  var a = 1;

(anonymous) (test.js:6:63)
  Promise.resolve(1).then(x => x * 2).then(x => x / 2);
  promise = Promise.resolve(1).then(x => x * 2).then(x => x / 2#);
  var a = 1;

200 201 202 203 204 205 206 207 208 209 210 211 212 213 214

Running test: testStepIntoAfterBreakpoint
testFunction (test.js:10:10)
(anonymous) (expr.js:0:0)
  var y = (a = 100);
  var z = #x + (a = 1) + (a = 2) + (a = 3) + f();
  function f() {

f (test.js:12:24)
testFunction (test.js:10:44)
(anonymous) (expr.js:0:0)
  function f() {
    for (let { x, y } = #{ x: 0, y: 1 }; y > 0; --y) { let z = x + y; }
  }