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
|
|
|
/*---
|
|
|
|
info: If GetBase(x) doesn't have a property GetPropertyName(x), 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: Checking Object object and Function object cases
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//CHECK#1
|
2020-09-11 17:58:45 +02:00
|
|
|
function MyFunction() {}
|
2011-09-07 08:35:18 +02:00
|
|
|
var MyObject = new MyFunction();
|
|
|
|
if (delete MyObject.prop !== true) {
|
2021-07-28 22:48:39 +02:00
|
|
|
throw new Test262Error(
|
2020-09-11 17:58:45 +02:00
|
|
|
'#1: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject.prop === true'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//CHECK#2
|
|
|
|
var MyObject = new Object();
|
|
|
|
if (delete MyObject.prop !== true) {
|
2021-07-28 22:48:39 +02:00
|
|
|
throw new Test262Error('#2: var MyObject = new Object(); delete MyObject.prop === true');
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|