Debian Codegraph @

js/src/tests/test262/language/expressions/delete/S11.4.1_A3.3_T5.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: If the property doesn't have the DontDelete attribute, remove the property
6 esid: sec-delete-operator-runtime-semantics-evaluation
7 description: Checking declared variable
8 flags: [noStrict]
9 ---*/
10
11 //CHECK#1
12 function MyFunction() {}
13 MyObjectNotVar = new MyFunction();
14 MyObjectNotVar.prop = 1;
15 delete MyObjectNotVar.prop;
16 if (MyObjectNotVar.prop !== undefined) {
17 throw new Test262Error(
18 '#1: function MyFunction(){}; MyObjectNotVar = new MyFunction(); MyFunction.prop = 1; delete MyObjectNotVar.prop; MyObjectNotVar.prop === undefined. Actual: ' +
19 MyObjectNotVar.prop
20 );
21 }
22
23 reportCompare(0, 0);