Replace runTestCase with assert helpers [test/built-ins/]

This commit is contained in:
André Bargull 2015-08-06 18:27:21 +02:00
parent 50c29deb29
commit 7d6d983ff9
4 changed files with 16 additions and 38 deletions

View File

@ -6,17 +6,11 @@ es5id: 15.1.1.2-0
description: >
Global.Infinity is a data property with default attribute values
(false)
includes:
- runTestCase.js
- fnGlobalObject.js
includes: [fnGlobalObject.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'Infinity');
if (desc.writable === false &&
desc.enumerable === false &&
desc.configurable === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, false, 'desc.configurable');

View File

@ -4,17 +4,11 @@
/*---
es5id: 15.1.1.1-0
description: Global.NaN is a data property with default attribute values (false)
includes:
- runTestCase.js
- fnGlobalObject.js
includes: [fnGlobalObject.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'NaN');
if (desc.writable === false &&
desc.enumerable === false &&
desc.configurable === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, false, 'desc.configurable');

View File

@ -6,17 +6,11 @@ es5id: 15.1.1.3-0
description: >
Global.undefined is a data property with default attribute values
(false)
includes:
- runTestCase.js
- fnGlobalObject.js
includes: [fnGlobalObject.js]
---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'undefined');
if (desc.writable === false &&
desc.enumerable === false &&
desc.configurable === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(desc.writable, false, 'desc.writable');
assert.sameValue(desc.enumerable, false, 'desc.enumerable');
assert.sameValue(desc.configurable, false, 'desc.configurable');

View File

@ -7,12 +7,8 @@ description: >
undefined is not writable, simple assignment should return the
rval value (11.13.1-6)
flags: [noStrict]
includes: [runTestCase.js]
---*/
function testcase(){
var newProperty = undefined = 42;
return (newProperty === 42);
}
runTestCase(testcase);
assert.sameValue(newProperty, 42, 'newProperty');