2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2014-07-22 01:09:02 +02:00
|
|
|
When the [[Delete]] method of O is called with property name P,
|
|
|
|
and if O doesn't have a property with name P, return true
|
2020-09-11 17:58:45 +02:00
|
|
|
esid: sec-delete-operator-runtime-semantics-evaluation
|
2014-07-22 01:09:02 +02:00
|
|
|
description: Try to delete not existent properties
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var __color__map = {};
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//CHECK#1
|
2020-09-11 17:58:45 +02:00
|
|
|
if (delete __color__map.red !== true) {
|
|
|
|
$ERROR(
|
|
|
|
'#1: var __color__map = {}; delete __color__map.red === true. Actual: ' +
|
|
|
|
delete __color__map.red
|
|
|
|
);
|
|
|
|
}
|
2011-09-07 08:35:18 +02:00
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//CHECK#2
|
2020-09-11 17:58:45 +02:00
|
|
|
if (delete __color__map['green'] !== true) {
|
|
|
|
$ERROR(
|
|
|
|
'#2: var __color__map = {}; delete __color__map["green"] === true. Actual: ' +
|
|
|
|
delete __color__map['green']
|
|
|
|
);
|
|
|
|
}
|
2011-09-07 08:35:18 +02:00
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//CHECK#3
|
|
|
|
var blue = 1;
|
2020-09-11 17:58:45 +02:00
|
|
|
if (delete __color__map[blue] !== true) {
|
|
|
|
$ERROR(
|
|
|
|
'#3: var __color__map = {}; var blue = 1; delete __color__map[blue] === true. Actual: ' +
|
|
|
|
delete __color__map[blue]
|
|
|
|
);
|
|
|
|
}
|
2011-09-07 08:35:18 +02:00
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|