mirror of https://github.com/tc39/test262.git
Consolidate harness tests (#2374)
This commit is contained in:
parent
5757d60e17
commit
83483b7310
|
@ -1,32 +0,0 @@
|
|||
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Objects whose specified property is not configurable do not satisfy the
|
||||
assertion outside of strict mode.
|
||||
includes: [propertyHelper.js]
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
var threw = false;
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 'a', {
|
||||
configurable: false
|
||||
});
|
||||
|
||||
try {
|
||||
verifyConfigurable(obj, 'a');
|
||||
} catch(err) {
|
||||
threw = true;
|
||||
if (err.constructor !== Test262Error) {
|
||||
$ERROR(
|
||||
'Expected a Test262Error, but a "' + err.constructor.name +
|
||||
'" was thrown.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (threw === false) {
|
||||
$ERROR('Expected a Test262Error, but no error was thrown.');
|
||||
}
|
|
@ -4,10 +4,10 @@
|
|||
/*---
|
||||
description: >
|
||||
Objects whose specified property is not configurable do not satisfy the
|
||||
assertion in strict mode.
|
||||
assertion.
|
||||
includes: [propertyHelper.js]
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
var threw = false;
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 'a', {
|
|
@ -1,17 +0,0 @@
|
|||
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Objects whose specified property is not configurable satisfy the assertion
|
||||
outside of strict mode.
|
||||
includes: [propertyHelper.js]
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 'a', {
|
||||
configurable: false
|
||||
});
|
||||
|
||||
verifyNotConfigurable(obj, 'a');
|
|
@ -3,11 +3,10 @@
|
|||
|
||||
/*---
|
||||
description: >
|
||||
Objects whose specified property is not configurable satisfy the assertion
|
||||
in strict mode.
|
||||
Objects whose specified property is not configurable satisfy the assertion.
|
||||
includes: [propertyHelper.js]
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 'a', {
|
||||
configurable: false
|
|
@ -1,23 +0,0 @@
|
|||
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Objects whose specified property is not writable satisfy the assertion
|
||||
outside of strict mode.
|
||||
includes: [propertyHelper.js]
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
|
||||
var obj = {};
|
||||
|
||||
Object.defineProperty(obj, 'a', {
|
||||
writable: false,
|
||||
value: 123
|
||||
});
|
||||
|
||||
verifyNotWritable(obj, 'a');
|
||||
|
||||
if (obj.a !== 123) {
|
||||
$ERROR('`verifyNotWritable` should be non-destructive.');
|
||||
}
|
|
@ -3,8 +3,7 @@
|
|||
|
||||
/*---
|
||||
description: >
|
||||
Objects whose specified property is not writable satisfy the assertion in
|
||||
strict mode.
|
||||
Objects whose specified property is not writable satisfy the assertion.
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright (C) 2015 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: >
|
||||
Objects whose specified property is not writable do not satisfy the
|
||||
assertion outside of strict mode.
|
||||
includes: [propertyHelper.js]
|
||||
flags: [noStrict]
|
||||
---*/
|
||||
var threw = false;
|
||||
var obj = {};
|
||||
Object.defineProperty(obj, 'a', {
|
||||
writable: false
|
||||
});
|
||||
|
||||
try {
|
||||
verifyWritable(obj, 'a');
|
||||
} catch(err) {
|
||||
threw = true;
|
||||
if (err.constructor !== Test262Error) {
|
||||
$ERROR(
|
||||
'Expected a Test262Error, but a "' + err.constructor.name +
|
||||
'" was thrown.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (threw === false) {
|
||||
$ERROR('Expected a Test262Error, but no error was thrown.');
|
||||
}
|
|
@ -4,10 +4,8 @@
|
|||
/*---
|
||||
description: >
|
||||
Objects whose specified property is not writable do not satisfy the
|
||||
assertion in strict mode.
|
||||
|
||||
assertion.
|
||||
includes: [propertyHelper.js]
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
var threw = false;
|
||||
var obj = {};
|
Loading…
Reference in New Issue