| 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: | |
| 6 |
When the [[Delete]] method of O is called with property name P, |
| 7 |
and if O doesn't have a property with name P, return true |
| 8 |
es5id: 8.12.7_A2_T1 |
| 9 |
description: Try to delete not existent properties |
| 10 |
---*/ |
| 11 |
|
| 12 |
var __color__map = {}; |
| 13 |
|
| 14 |
////////////////////////////////////////////////////////////////////////////// |
| 15 |
//CHECK#1 |
| 16 |
if (delete __color__map.red !== true){ |
| 17 |
$ERROR('#1: var __color__map = {}; delete __color__map.red === true. Actual: ' + (delete __color__map.red)); |
| 18 |
}; |
| 19 |
// |
| 20 |
////////////////////////////////////////////////////////////////////////////// |
| 21 |
|
| 22 |
////////////////////////////////////////////////////////////////////////////// |
| 23 |
//CHECK#2 |
| 24 |
if (delete __color__map["green"] !== true){ |
| 25 |
$ERROR('#2: var __color__map = {}; delete __color__map["green"] === true. Actual: ' + (delete __color__map["green"])); |
| 26 |
}; |
| 27 |
// |
| 28 |
////////////////////////////////////////////////////////////////////////////// |
| 29 |
|
| 30 |
////////////////////////////////////////////////////////////////////////////// |
| 31 |
//CHECK#3 |
| 32 |
var blue = 1; |
| 33 |
if (delete __color__map[blue] !== true){ |
| 34 |
$ERROR('#3: var __color__map = {}; var blue = 1; delete __color__map[blue] === true. Actual: ' + (delete __color__map[blue])); |
| 35 |
}; |
| 36 |
// |
| 37 |
////////////////////////////////////////////////////////////////////////////// |