From 8a2ec342001b7fa11835f030d9da3342a8ac8f25 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 8 Sep 2017 12:25:44 -0400 Subject: harness/*: Eliminate unnecessary uses of features that would require "features: ..." tags --- harness/assert.js | 4 ++-- harness/compareArray.js | 2 +- harness/features.yml | 4 ++-- harness/propertyHelper.js | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'harness') diff --git a/harness/assert.js b/harness/assert.js index 0898bfd90..384b8e8f0 100644 --- a/harness/assert.js +++ b/harness/assert.js @@ -88,8 +88,8 @@ assert.throws = function (expectedErrorConstructor, func, message) { }; assert.throws.early = function(err, code) { - let wrappedCode = `function wrapperFn() { ${code} }`; + let wrappedCode = 'function wrapperFn() { ' + code + ' }'; let ieval = eval; - assert.throws(err, function() { Function(wrappedCode); }, `Function: ${code}`); + assert.throws(err, function() { Function(wrappedCode); }, 'Function: ' + code); }; diff --git a/harness/compareArray.js b/harness/compareArray.js index 44b92ea02..aaeaa4800 100644 --- a/harness/compareArray.js +++ b/harness/compareArray.js @@ -20,5 +20,5 @@ function compareArray(a, b) { assert.compareArray = function(actual, expected, message) { 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); }; diff --git a/harness/features.yml b/harness/features.yml index 34a3a0bfa..177bec32b 100644 --- a/harness/features.yml +++ b/harness/features.yml @@ -1,3 +1,3 @@ -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] diff --git a/harness/propertyHelper.js b/harness/propertyHelper.js index 9b528e8f5..cc1359fe6 100644 --- a/harness/propertyHelper.js +++ b/harness/propertyHelper.js @@ -20,7 +20,7 @@ function verifyProperty(obj, name, desc, options) { assert.sameValue( originalDesc, undefined, - `obj['${nameStr}'] descriptor should be undefined` + "obj['" + nameStr + "'] descriptor should be undefined" ); // desc and originalDesc are both undefined, problem solved; @@ -29,47 +29,47 @@ function verifyProperty(obj, name, desc, options) { assert( Object.prototype.hasOwnProperty.call(obj, name), - `obj should have an own property ${nameStr}` + "obj should have an own property " + nameStr ); assert.notSameValue( desc, null, - `The desc argument should be an object or undefined, null` + "The desc argument should be an object or undefined, null" ); assert.sameValue( typeof desc, "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 = []; if (Object.prototype.hasOwnProperty.call(desc, '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 (desc.enumerable !== originalDesc.enumerable || 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 (desc.writable !== originalDesc.writable || 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 (desc.configurable !== originalDesc.configurable || desc.configurable !== isConfigurable(obj, name)) { - failures.push(`descriptor should ${desc.configurable ? '' : 'not '}be configurable`); + failures.push('descriptor should ' + (desc.configurable ? '' : 'not ') + 'be configurable'); } } -- cgit v1.2.1