Consolidate harness tests (#2374)

This commit is contained in:
jugglinmike 2019-09-27 16:24:02 -04:00 committed by Leo Balter
parent 5757d60e17
commit 83483b7310
8 changed files with 6 additions and 113 deletions

View File

@ -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.');
}

View File

@ -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', {

View File

@ -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');

View File

@ -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

View File

@ -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.');
}

View File

@ -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]
---*/

View File

@ -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.');
}

View File

@ -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 = {};