for-of-loops-expected.txt 9.13 KB
Newer Older
1 2 3 4
Tests breakable locations in for-of loops.

Running test: testBreakLocations

5 6
Running test: testStepInto

7 8 9 10
function testFunction() {
  var obj = |_|{a : 1};
  var arr = |_|[1];
  var all = |_|[];
11 12 13 14 15 16
  for (var |_|k in |_|arr) { all.|C|push(k); }
  for (var |_|k of |_|arr) { all.|C|push(k); }
  for (var |_|k in |_|obj) { all.|C|push(k); }
  for (let |_|k in |_|arr) { all.|C|push(k); }
  for (let |_|k of |_|arr) { all.|C|push(k); }
  for (let |_|k in |_|obj) { all.|C|push(k); }
17 18 19 20 21 22

  var iterable = |_|{
    [Symbol.iterator]() {
      |_|return {
        i: 0,
        next() {
23
          if (this.|_|i < 1) {
24
            |_|return { value: this.i++, done: false };|R|
25
          }
26 27 28 29
          |_|return { value: undefined, done: true };|R|
        }
      };|R|
    }
30
  };
31
  for (var |_|k of |_|iterable) { all.|C|push(k); }
32
  |_|iterable.i = 0;
33
  for (let |_|k of |_|iterable) { all.|C|push(k); }
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
|R|}

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


testFunction (test.js:2:12)
(anonymous) (expr.js:0:0)
function testFunction() {
  var obj = #{a : 1};
  var arr = [1];

testFunction (test.js:3:12)
(anonymous) (expr.js:0:0)
  var obj = {a : 1};
  var arr = #[1];
  var all = [];

testFunction (test.js:4:12)
(anonymous) (expr.js:0:0)
  var arr = [1];
  var all = #[];
  for (var k in arr) { all.push(k); }

testFunction (test.js:5:16)
(anonymous) (expr.js:0:0)
  var all = [];
  for (var k in #arr) { all.push(k); }
  for (var k of arr) { all.push(k); }

testFunction (test.js:5:11)
(anonymous) (expr.js:0:0)
  var all = [];
  for (var #k in arr) { all.push(k); }
  for (var k of arr) { all.push(k); }

69
testFunction (test.js:5:27)
70 71
(anonymous) (expr.js:0:0)
  var all = [];
72
  for (var k in arr) { all.#push(k); }
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
  for (var k of arr) { all.push(k); }

testFunction (test.js:5:11)
(anonymous) (expr.js:0:0)
  var all = [];
  for (var #k in arr) { all.push(k); }
  for (var k of arr) { all.push(k); }

testFunction (test.js:6:16)
(anonymous) (expr.js:0:0)
  for (var k in arr) { all.push(k); }
  for (var k of #arr) { all.push(k); }
  for (var k in obj) { all.push(k); }

testFunction (test.js:6:11)
(anonymous) (expr.js:0:0)
  for (var k in arr) { all.push(k); }
  for (var #k of arr) { all.push(k); }
  for (var k in obj) { all.push(k); }

93
testFunction (test.js:6:27)
94 95
(anonymous) (expr.js:0:0)
  for (var k in arr) { all.push(k); }
96
  for (var k of arr) { all.#push(k); }
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
  for (var k in obj) { all.push(k); }

testFunction (test.js:6:11)
(anonymous) (expr.js:0:0)
  for (var k in arr) { all.push(k); }
  for (var #k of arr) { all.push(k); }
  for (var k in obj) { all.push(k); }

testFunction (test.js:7:16)
(anonymous) (expr.js:0:0)
  for (var k of arr) { all.push(k); }
  for (var k in #obj) { all.push(k); }
  for (let k in arr) { all.push(k); }

testFunction (test.js:7:11)
(anonymous) (expr.js:0:0)
  for (var k of arr) { all.push(k); }
  for (var #k in obj) { all.push(k); }
  for (let k in arr) { all.push(k); }

117
testFunction (test.js:7:27)
118 119
(anonymous) (expr.js:0:0)
  for (var k of arr) { all.push(k); }
120
  for (var k in obj) { all.#push(k); }
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
  for (let k in arr) { all.push(k); }

testFunction (test.js:7:11)
(anonymous) (expr.js:0:0)
  for (var k of arr) { all.push(k); }
  for (var #k in obj) { all.push(k); }
  for (let k in arr) { all.push(k); }

testFunction (test.js:8:16)
(anonymous) (expr.js:0:0)
  for (var k in obj) { all.push(k); }
  for (let k in #arr) { all.push(k); }
  for (let k of arr) { all.push(k); }

testFunction (test.js:8:11)
(anonymous) (expr.js:0:0)
  for (var k in obj) { all.push(k); }
  for (let #k in arr) { all.push(k); }
  for (let k of arr) { all.push(k); }

141
testFunction (test.js:8:27)
142 143
(anonymous) (expr.js:0:0)
  for (var k in obj) { all.push(k); }
144
  for (let k in arr) { all.#push(k); }
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
  for (let k of arr) { all.push(k); }

testFunction (test.js:8:11)
(anonymous) (expr.js:0:0)
  for (var k in obj) { all.push(k); }
  for (let #k in arr) { all.push(k); }
  for (let k of arr) { all.push(k); }

testFunction (test.js:9:16)
(anonymous) (expr.js:0:0)
  for (let k in arr) { all.push(k); }
  for (let k of #arr) { all.push(k); }
  for (let k in obj) { all.push(k); }

testFunction (test.js:9:11)
(anonymous) (expr.js:0:0)
  for (let k in arr) { all.push(k); }
  for (let #k of arr) { all.push(k); }
  for (let k in obj) { all.push(k); }

165
testFunction (test.js:9:27)
166 167
(anonymous) (expr.js:0:0)
  for (let k in arr) { all.push(k); }
168
  for (let k of arr) { all.#push(k); }
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
  for (let k in obj) { all.push(k); }

testFunction (test.js:9:11)
(anonymous) (expr.js:0:0)
  for (let k in arr) { all.push(k); }
  for (let #k of arr) { all.push(k); }
  for (let k in obj) { all.push(k); }

testFunction (test.js:10:16)
(anonymous) (expr.js:0:0)
  for (let k of arr) { all.push(k); }
  for (let k in #obj) { all.push(k); }


testFunction (test.js:10:11)
(anonymous) (expr.js:0:0)
  for (let k of arr) { all.push(k); }
  for (let #k in obj) { all.push(k); }


189
testFunction (test.js:10:27)
190 191
(anonymous) (expr.js:0:0)
  for (let k of arr) { all.push(k); }
192
  for (let k in obj) { all.#push(k); }
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219


testFunction (test.js:10:11)
(anonymous) (expr.js:0:0)
  for (let k of arr) { all.push(k); }
  for (let #k in obj) { all.push(k); }


testFunction (test.js:12:17)
(anonymous) (expr.js:0:0)

  var iterable = #{
    [Symbol.iterator]() {

testFunction (test.js:25:16)
(anonymous) (expr.js:0:0)
  };
  for (var k of #iterable) { all.push(k); }
  iterable.i = 0;

[Symbol.iterator] (test.js:14:6)
testFunction (test.js:25:16)
(anonymous) (expr.js:0:0)
    [Symbol.iterator]() {
      #return {
        i: 0,

220
[Symbol.iterator] (test.js:22:8)
221 222
testFunction (test.js:25:16)
(anonymous) (expr.js:0:0)
223 224 225
        }
      };#
    }
226 227 228 229 230 231 232

testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
  };
  for (var #k of iterable) { all.push(k); }
  iterable.i = 0;

233
next (test.js:17:19)
234 235 236
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
        next() {
237
          if (this.#i < 1) {
238 239 240 241 242 243 244 245 246
            return { value: this.i++, done: false };

next (test.js:18:12)
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
          if (this.i < 1) {
            #return { value: this.i++, done: false };
          }

247
next (test.js:18:52)
248 249
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
250 251 252
          if (this.i < 1) {
            return { value: this.i++, done: false };#
          }
253

254
testFunction (test.js:25:32)
255 256
(anonymous) (expr.js:0:0)
  };
257
  for (var k of iterable) { all.#push(k); }
258 259 260 261 262 263 264 265
  iterable.i = 0;

testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
  };
  for (var #k of iterable) { all.push(k); }
  iterable.i = 0;

266
next (test.js:17:19)
267 268 269
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
        next() {
270
          if (this.#i < 1) {
271 272 273 274 275 276 277 278 279
            return { value: this.i++, done: false };

next (test.js:20:10)
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
          }
          #return { value: undefined, done: true };
        }

280
next (test.js:20:50)
281 282
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
283 284 285
          }
          return { value: undefined, done: true };#
        }
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305

testFunction (test.js:26:2)
(anonymous) (expr.js:0:0)
  for (var k of iterable) { all.push(k); }
  #iterable.i = 0;
  for (let k of iterable) { all.push(k); }

testFunction (test.js:27:16)
(anonymous) (expr.js:0:0)
  iterable.i = 0;
  for (let k of #iterable) { all.push(k); }
}

[Symbol.iterator] (test.js:14:6)
testFunction (test.js:27:16)
(anonymous) (expr.js:0:0)
    [Symbol.iterator]() {
      #return {
        i: 0,

306
[Symbol.iterator] (test.js:22:8)
307 308
testFunction (test.js:27:16)
(anonymous) (expr.js:0:0)
309 310 311
        }
      };#
    }
312 313 314 315 316 317 318

testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
  iterable.i = 0;
  for (let #k of iterable) { all.push(k); }
}

319
next (test.js:17:19)
320 321 322
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
        next() {
323
          if (this.#i < 1) {
324 325 326 327 328 329 330 331 332
            return { value: this.i++, done: false };

next (test.js:18:12)
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
          if (this.i < 1) {
            #return { value: this.i++, done: false };
          }

333
next (test.js:18:52)
334 335
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
336 337 338
          if (this.i < 1) {
            return { value: this.i++, done: false };#
          }
339

340
testFunction (test.js:27:32)
341 342
(anonymous) (expr.js:0:0)
  iterable.i = 0;
343
  for (let k of iterable) { all.#push(k); }
344 345 346 347 348 349 350 351
}

testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
  iterable.i = 0;
  for (let #k of iterable) { all.push(k); }
}

352
next (test.js:17:19)
353 354 355
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
        next() {
356
          if (this.#i < 1) {
357 358 359 360 361 362 363 364 365
            return { value: this.i++, done: false };

next (test.js:20:10)
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
          }
          #return { value: undefined, done: true };
        }

366
next (test.js:20:50)
367 368
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
369 370 371
          }
          return { value: undefined, done: true };#
        }
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388

testFunction (test.js:28:0)
(anonymous) (expr.js:0:0)
  for (let k of iterable) { all.push(k); }
#}

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



Running test: testStepIntoAfterBreakpoint
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
  };
  for (var #k of iterable) { all.push(k); }
  iterable.i = 0;

389
next (test.js:17:19)
390 391 392
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
        next() {
393
          if (this.#i < 1) {
394 395
            return { value: this.i++, done: false };