mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 23:44:27 +02:00
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: >
|
description: >
|
||||||
Objects whose specified property is not configurable do not satisfy the
|
Objects whose specified property is not configurable do not satisfy the
|
||||||
assertion in strict mode.
|
assertion.
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
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: >
|
description: >
|
||||||
Objects whose specified property is not configurable satisfy the assertion
|
Objects whose specified property is not configurable satisfy the assertion.
|
||||||
in strict mode.
|
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var obj = {};
|
var obj = {};
|
||||||
Object.defineProperty(obj, 'a', {
|
Object.defineProperty(obj, 'a', {
|
||||||
configurable: false
|
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: >
|
description: >
|
||||||
Objects whose specified property is not writable satisfy the assertion in
|
Objects whose specified property is not writable satisfy the assertion.
|
||||||
strict mode.
|
|
||||||
includes: [propertyHelper.js]
|
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: >
|
description: >
|
||||||
Objects whose specified property is not writable do not satisfy the
|
Objects whose specified property is not writable do not satisfy the
|
||||||
assertion in strict mode.
|
assertion.
|
||||||
|
|
||||||
includes: [propertyHelper.js]
|
includes: [propertyHelper.js]
|
||||||
flags: [onlyStrict]
|
|
||||||
---*/
|
---*/
|
||||||
var threw = false;
|
var threw = false;
|
||||||
var obj = {};
|
var obj = {};
|
Loading…
x
Reference in New Issue
Block a user