OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --harmony-unicode | 5 // Flags: --harmony-unicode |
6 | 6 |
7 var num = 5; | 7 var num = 5; |
8 var str = "str"; | 8 var str = "str"; |
9 function fn() { return "result"; } | 9 function fn() { return "result"; } |
10 var obj = { | 10 var obj = { |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 assertTrue(Array.isArray(cs.raw)); | 298 assertTrue(Array.isArray(cs.raw)); |
299 assertEquals(Array.prototype, Object.getPrototypeOf(cs)); | 299 assertEquals(Array.prototype, Object.getPrototypeOf(cs)); |
300 assertTrue(Array.isArray(cs)); | 300 assertTrue(Array.isArray(cs)); |
301 | 301 |
302 var cooked0 = Object.getOwnPropertyDescriptor(cs, "0"); | 302 var cooked0 = Object.getOwnPropertyDescriptor(cs, "0"); |
303 assertFalse(cooked0.writable); | 303 assertFalse(cooked0.writable); |
304 assertFalse(cooked0.configurable); | 304 assertFalse(cooked0.configurable); |
305 assertTrue(cooked0.enumerable); | 305 assertTrue(cooked0.enumerable); |
306 | 306 |
307 var raw0 = Object.getOwnPropertyDescriptor(cs.raw, "0"); | 307 var raw0 = Object.getOwnPropertyDescriptor(cs.raw, "0"); |
308 assertFalse(cooked0.writable); | 308 assertFalse(raw0.writable); |
309 assertFalse(cooked0.configurable); | 309 assertFalse(raw0.configurable); |
310 assertTrue(cooked0.enumerable); | 310 assertTrue(raw0.enumerable); |
311 | 311 |
312 var length = Object.getOwnPropertyDescriptor(cs, "length"); | 312 var length = Object.getOwnPropertyDescriptor(cs, "length"); |
313 assertFalse(length.writable); | 313 assertFalse(length.writable); |
314 assertFalse(length.configurable); | 314 assertFalse(length.configurable); |
315 assertFalse(length.enumerable); | 315 assertFalse(length.enumerable); |
316 | 316 |
317 length = Object.getOwnPropertyDescriptor(cs.raw, "length"); | 317 length = Object.getOwnPropertyDescriptor(cs.raw, "length"); |
318 assertFalse(length.writable); | 318 assertFalse(length.writable); |
319 assertFalse(length.configurable); | 319 assertFalse(length.configurable); |
320 assertFalse(length.enumerable); | 320 assertFalse(length.enumerable); |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 assertEquals("-1-2-3-", tag`-${subs[0]}-${subs[1]}-${subs[2]}-`); | 672 assertEquals("-1-2-3-", tag`-${subs[0]}-${subs[1]}-${subs[2]}-`); |
673 assertArrayEquals(["get0", "get1", "get2"], log); | 673 assertArrayEquals(["get0", "get1", "get2"], log); |
674 assertArrayEquals([1, 2, 3], tagged); | 674 assertArrayEquals([1, 2, 3], tagged); |
675 | 675 |
676 tagged.length = 0; | 676 tagged.length = 0; |
677 log.length = 0; | 677 log.length = 0; |
678 assertEquals("-1-", tag`-${subs[0]}-`); | 678 assertEquals("-1-", tag`-${subs[0]}-`); |
679 assertArrayEquals(["get0"], log); | 679 assertArrayEquals(["get0"], log); |
680 assertArrayEquals([1], tagged); | 680 assertArrayEquals([1], tagged); |
681 })(); | 681 })(); |
OLD | NEW |