for-of-loops-expected.txt 9.37 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
  for (var |_|k in |_|arr) { all.|C|push(k); }
12
  for (var |C|k of |_|arr) { all.|C|push(k); }
13 14
  for (var |_|k in |_|obj) { all.|C|push(k); }
  for (let |_|k in |_|arr) { all.|C|push(k); }
15
  for (let |C|k of |_|arr) { all.|C|push(k); }
16
  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 |C|k of |_|iterable) { all.|C|push(k); }
32
  |_|iterable.i = 0;
33
  for (let |C|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 255 256 257 258 259
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
  };
  for (var #k of iterable) { all.push(k); }
  iterable.i = 0;

260
testFunction (test.js:25:32)
261 262
(anonymous) (expr.js:0:0)
  };
263
  for (var k of iterable) { all.#push(k); }
264 265 266 267 268 269 270 271
  iterable.i = 0;

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

272
next (test.js:17:19)
273 274 275
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
        next() {
276
          if (this.#i < 1) {
277 278 279 280 281 282 283 284 285
            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 };
        }

286
next (test.js:20:50)
287 288
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
289 290 291
          }
          return { value: undefined, done: true };#
        }
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311

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,

312
[Symbol.iterator] (test.js:22:8)
313 314
testFunction (test.js:27:16)
(anonymous) (expr.js:0:0)
315 316 317
        }
      };#
    }
318 319 320 321 322 323 324

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

325
next (test.js:17:19)
326 327 328
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
        next() {
329
          if (this.#i < 1) {
330 331 332 333 334 335 336 337 338
            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 };
          }

339
next (test.js:18:52)
340 341
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
342 343 344
          if (this.i < 1) {
            return { value: this.i++, done: false };#
          }
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
testFunction (test.js:27:32)
353 354
(anonymous) (expr.js:0:0)
  iterable.i = 0;
355
  for (let k of iterable) { all.#push(k); }
356 357 358 359 360 361 362 363
}

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

364
next (test.js:17:19)
365 366 367
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
        next() {
368
          if (this.#i < 1) {
369 370 371 372 373 374 375 376 377
            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 };
        }

378
next (test.js:20:50)
379 380
testFunction (test.js:27:11)
(anonymous) (expr.js:0:0)
381 382 383
          }
          return { value: undefined, done: true };#
        }
384 385 386 387 388 389

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

390
(anonymous) (expr.js:0:35)
391 392 393 394 395 396 397 398 399 400



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

401
next (test.js:17:19)
402 403 404
testFunction (test.js:25:11)
(anonymous) (expr.js:0:0)
        next() {
405
          if (this.#i < 1) {
406 407
            return { value: this.i++, done: false };