Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/delete/11.4.1-4.a-6.js

raw
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-6
9 description: delete operator returns true when deleting a property inside 'with'
10 flags: [noStrict]
11 ---*/
12
13 var o = new Object();
14 o.x = 1;
15 var d;
16 with(o)
17 {
18 d = delete x;
19 }
20
21 assert.sameValue(d, true, 'd');
22 assert.sameValue(o.x, undefined, 'o.x');