Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
michael@0 | 2 | // This code is governed by the BSD license found in the LICENSE file. |
michael@0 | 3 | |
michael@0 | 4 | /** |
michael@0 | 5 | * If the property has the DontDelete attribute, return false |
michael@0 | 6 | * |
michael@0 | 7 | * @path ch11/11.4/11.4.1/S11.4.1_A3.1.js |
michael@0 | 8 | * @description Checking declared variable |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | //CHECK#1 |
michael@0 | 12 | var x = 1; |
michael@0 | 13 | if (delete x !== false) { |
michael@0 | 14 | $ERROR('#1: var x = 1; delete x === false'); |
michael@0 | 15 | } |
michael@0 | 16 | |
michael@0 | 17 | //CHECK#2 |
michael@0 | 18 | var y = 1; |
michael@0 | 19 | if (delete this.y !== false) { |
michael@0 | 20 | $ERROR('#2: var y = 1; delete this.y === false'); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | //CHECK#3 |
michael@0 | 24 | function MyFunction(){}; |
michael@0 | 25 | if (delete MyFunction !== false) { |
michael@0 | 26 | $ERROR('#3: function MyFunction(){}; delete MyFunction === false'); |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | //CHECK#4 |
michael@0 | 30 | function MyFunction(){}; |
michael@0 | 31 | var MyObject = new MyFunction(); |
michael@0 | 32 | if (delete MyObject !== false) { |
michael@0 | 33 | $ERROR('#4: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject === false'); |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | //CHECK#5 |
michael@0 | 37 | if (delete MyObject !== false) { |
michael@0 | 38 | $ERROR('#5: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject === false'); |
michael@0 | 39 | } |
michael@0 | 40 |