| 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 |
es5id: 11.4.1-4.a-14 |
| 9 |
description: delete operator returns true when deleting Array elements |
| 10 |
---*/ |
| 11 |
|
| 12 |
var a = [1,2,3] |
| 13 |
a.x = 10; |
| 14 |
var d = delete a[1] |
| 15 |
|
| 16 |
assert.sameValue(d, true, 'd'); |
| 17 |
assert.sameValue(a[1], undefined, 'a[1]'); |