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: > description: >
Global.Infinity is a data property with default attribute values Global.Infinity is a data property with default attribute values
(false) (false)
includes: includes: [fnGlobalObject.js]
- runTestCase.js
- fnGlobalObject.js
---*/ ---*/
function testcase() {
var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'Infinity'); var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), 'Infinity');
if (desc.writable === false &&
desc.enumerable === false && assert.sameValue(desc.writable, false, 'desc.writable');
desc.configurable === false) { assert.sameValue(desc.enumerable, false, 'desc.enumerable');
return true; assert.sameValue(desc.configurable, false, 'desc.configurable');
}
}
runTestCase(testcase);

View File

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

View File

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

View File

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