| 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-classes --allow-natives-syntax | 5 // Flags: --allow-natives-syntax |
| 6 | 6 |
| 7 | 7 |
| 8 (function TestSingleClass() { | 8 (function TestSingleClass() { |
| 9 function f(x) { | 9 function f(x) { |
| 10 var a = [0, 1, 2] | 10 var a = [0, 1, 2] |
| 11 return a[x]; | 11 return a[x]; |
| 12 } | 12 } |
| 13 | 13 |
| 14 function ClassD() { } | 14 function ClassD() { } |
| 15 | 15 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 assertEquals("abc", g(o1)); | 97 assertEquals("abc", g(o1)); |
| 98 } ()); | 98 } ()); |
| 99 | 99 |
| 100 (function TestExtensibility() { | 100 (function TestExtensibility() { |
| 101 function f() {} | 101 function f() {} |
| 102 Object.preventExtensions(f); | 102 Object.preventExtensions(f); |
| 103 assertFalse(Object.isExtensible(f)); | 103 assertFalse(Object.isExtensible(f)); |
| 104 var m = %ToMethod(f, {}); | 104 var m = %ToMethod(f, {}); |
| 105 assertTrue(Object.isExtensible(m)); | 105 assertTrue(Object.isExtensible(m)); |
| 106 }()); | 106 }()); |
| OLD | NEW |