mirror of https://github.com/tc39/test262.git
Replace runTestCase with assert helpers [test/built-ins/]
This commit is contained in:
parent
50c29deb29
commit
7d6d983ff9
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue