Skip to content
Snippets Groups Projects
Commit 8a2ec342 authored by Rick Waldron's avatar Rick Waldron
Browse files

harness/*: Eliminate unnecessary uses of features that would require "features: ..." tags

parent 65424be3
No related branches found
No related tags found
No related merge requests found
...@@ -88,8 +88,8 @@ assert.throws = function (expectedErrorConstructor, func, message) { ...@@ -88,8 +88,8 @@ assert.throws = function (expectedErrorConstructor, func, message) {
}; };
assert.throws.early = function(err, code) { assert.throws.early = function(err, code) {
let wrappedCode = `function wrapperFn() { ${code} }`; let wrappedCode = 'function wrapperFn() { ' + code + ' }';
let ieval = eval; let ieval = eval;
assert.throws(err, function() { Function(wrappedCode); }, `Function: ${code}`); assert.throws(err, function() { Function(wrappedCode); }, 'Function: ' + code);
}; };
...@@ -20,5 +20,5 @@ function compareArray(a, b) { ...@@ -20,5 +20,5 @@ function compareArray(a, b) {
assert.compareArray = function(actual, expected, message) { assert.compareArray = function(actual, expected, message) {
assert(compareArray(actual, expected), assert(compareArray(actual, expected),
`Expected [${actual.join(", ")}] and [${expected.join(", ")}] to have the same contents. ${message}`); 'Expected [' + actual.join(', ') + '] and [' + expected.join(', ') + '] to have the same contents. ' + message);
}; };
propertyHelper.js: [template] typeCoercion.js: [Symbol.toPrimitive, BigInt]
typeCoercion.js: [Symbol.toPrimitive,BigInt] testAtomics.js: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, arrow-function, let, for-of]
testTypedArray.js: [TypedArray] testTypedArray.js: [TypedArray]
...@@ -20,7 +20,7 @@ function verifyProperty(obj, name, desc, options) { ...@@ -20,7 +20,7 @@ function verifyProperty(obj, name, desc, options) {
assert.sameValue( assert.sameValue(
originalDesc, originalDesc,
undefined, undefined,
`obj['${nameStr}'] descriptor should be undefined` "obj['" + nameStr + "'] descriptor should be undefined"
); );
// desc and originalDesc are both undefined, problem solved; // desc and originalDesc are both undefined, problem solved;
...@@ -29,47 +29,47 @@ function verifyProperty(obj, name, desc, options) { ...@@ -29,47 +29,47 @@ function verifyProperty(obj, name, desc, options) {
assert( assert(
Object.prototype.hasOwnProperty.call(obj, name), Object.prototype.hasOwnProperty.call(obj, name),
`obj should have an own property ${nameStr}` "obj should have an own property " + nameStr
); );
assert.notSameValue( assert.notSameValue(
desc, desc,
null, null,
`The desc argument should be an object or undefined, null` "The desc argument should be an object or undefined, null"
); );
assert.sameValue( assert.sameValue(
typeof desc, typeof desc,
"object", "object",
`The desc argument should be an object or undefined, ${String(desc)}` "The desc argument should be an object or undefined, " + String(desc)
); );
var failures = []; var failures = [];
if (Object.prototype.hasOwnProperty.call(desc, 'value')) { if (Object.prototype.hasOwnProperty.call(desc, 'value')) {
if (desc.value !== originalDesc.value) { if (desc.value !== originalDesc.value) {
failures.push(`descriptor value should be ${desc.value}`); failures.push("descriptor value should be " + desc.value);
} }
} }
if (Object.prototype.hasOwnProperty.call(desc, 'enumerable')) { if (Object.prototype.hasOwnProperty.call(desc, 'enumerable')) {
if (desc.enumerable !== originalDesc.enumerable || if (desc.enumerable !== originalDesc.enumerable ||
desc.enumerable !== isEnumerable(obj, name)) { desc.enumerable !== isEnumerable(obj, name)) {
failures.push(`descriptor should ${desc.enumerable ? '' : 'not '}be enumerable`); failures.push('descriptor should ' + (desc.enumerable ? '' : 'not ') + 'be enumerable');
} }
} }
if (Object.prototype.hasOwnProperty.call(desc, 'writable')) { if (Object.prototype.hasOwnProperty.call(desc, 'writable')) {
if (desc.writable !== originalDesc.writable || if (desc.writable !== originalDesc.writable ||
desc.writable !== isWritable(obj, name)) { desc.writable !== isWritable(obj, name)) {
failures.push(`descriptor should ${desc.writable ? '' : 'not '}be writable`); failures.push('descriptor should ' + (desc.writable ? '' : 'not ') + 'be writable');
} }
} }
if (Object.prototype.hasOwnProperty.call(desc, 'configurable')) { if (Object.prototype.hasOwnProperty.call(desc, 'configurable')) {
if (desc.configurable !== originalDesc.configurable || if (desc.configurable !== originalDesc.configurable ||
desc.configurable !== isConfigurable(obj, name)) { desc.configurable !== isConfigurable(obj, name)) {
failures.push(`descriptor should ${desc.configurable ? '' : 'not '}be configurable`); failures.push('descriptor should ' + (desc.configurable ? '' : 'not ') + 'be configurable');
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment