11.4.1-4.a-12.js (633B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: | 6 This test is actually testing the [[Delete]] internal method (8.12.8). Since the 7 language provides no way to directly exercise [[Delete]], the tests are placed here. 8 esid: sec-delete-operator-runtime-semantics-evaluation 9 description: delete operator returns false when deleting a property(length) 10 flags: [noStrict] 11 ---*/ 12 13 var a = [1, 2, 3]; 14 a.x = 10; 15 var d = delete a.length; 16 17 assert.sameValue(d, false, 'd'); 18 assert.sameValue(a.length, 3, 'a.length'); 19 20 reportCompare(0, 0);