Replace runTestCase with assert helpers [test/built-ins/Object/is{Frozen, Extensible, Sealed}]

This commit is contained in:
André Bargull 2015-08-11 17:51:42 +02:00
parent 9cc4016866
commit 8d358cbd07
119 changed files with 196 additions and 786 deletions

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-0-1
description: Object.isExtensible must exist as a function
includes: [runTestCase.js]
---*/
function testcase() {
var f = Object.isExtensible ;
if (typeof(f) === "function") {
return true;
}
}
runTestCase(testcase);
assert.sameValue(typeof(f), "function", 'typeof(f)');

View File

@ -4,12 +4,6 @@
/*---
es5id: 15.2.3.13-0-2
description: Object.isExtensible must exist as a function taking 1 parameter
includes: [runTestCase.js]
---*/
function testcase() {
if (Object.isExtensible.length === 1) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(Object.isExtensible.length, 1, 'Object.isExtensible.length');

View File

@ -9,14 +9,8 @@ es5id: 15.2.3.13-0-3
description: >
Object.isExtensible is true for objects created using the Object
constructor
includes: [runTestCase.js]
---*/
function testcase() {
var o = new Object();
if (Object.isExtensible(o) === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(Object.isExtensible(o), true, 'Object.isExtensible(o)');

View File

@ -4,11 +4,6 @@
/*---
es5id: 15.2.3.13-1-1
description: Object.isExtensible does not throw TypeError if 'O' is undefined
includes: [runTestCase.js]
---*/
function testcase() {
Object.isExtensible(undefined);
return true;
}
runTestCase(testcase);

View File

@ -4,11 +4,6 @@
/*---
es5id: 15.2.3.13-1-2
description: Object.isExtensible does not throw TypeError if 'O' is null
includes: [runTestCase.js]
---*/
function testcase() {
Object.isExtensible(null);
return true;
}
runTestCase(testcase);

View File

@ -4,11 +4,6 @@
/*---
es5id: 15.2.3.13-1-3
description: Object.isExtensible does not throw TypeError if 'O' is a boolean
includes: [runTestCase.js]
---*/
function testcase() {
Object.isExtensible(true);
return true;
}
runTestCase(testcase);

View File

@ -4,11 +4,6 @@
/*---
es5id: 15.2.3.13-1-4
description: Object.isExtensible does not throw TypeError if 'O' is a string
includes: [runTestCase.js]
---*/
function testcase() {
Object.isExtensible("abc");
return true;
}
runTestCase(testcase);

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.13-1
description: >
Object.isExtensible does not throw TypeError if type of first
param is not Object
includes: [runTestCase.js]
---*/
function testcase() {
Object.isExtensible(0);
return true;
}
runTestCase(testcase);

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-10
description: Object.isExtensible returns true for all built-in objects (RegExp)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(RegExp);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-11
description: Object.isExtensible returns true for all built-in objects (Error)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Error);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-12
description: Object.isExtensible returns true for all built-in objects (JSON)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(JSON);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.13-2-13
description: >
Object.isExtensible returns true for all built-in objects
(Function.constructor)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Function.constructor);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.13-2-14
description: >
Object.isExtensible returns true for all built-in objects
(Function.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Function.prototype);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.13-2-15
description: >
Object.isExtensible returns true for all built-in objects
(Array.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Array.prototype);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.13-2-16
description: >
Object.isExtensible returns true for all built-in objects
(String.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(String.prototype);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.13-2-17
description: >
Object.isExtensible returns true for all built-in objects
(Boolean.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Boolean.prototype);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.13-2-18
description: >
Object.isExtensible returns true for all built-in objects
(Number.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Number.prototype);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.13-2-19
description: >
Object.isExtensible returns true for all built-in objects
(Date.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Date.prototype);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,14 +4,9 @@
/*---
es5id: 15.2.3.13-2-2
description: Object.isExtensible returns true for all built-in objects (Object)
includes: [runTestCase.js]
---*/
function testcase() {
var o = {};
var e = Object.isExtensible(o);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.13-2-20
description: >
Object.isExtensible returns true for all built-in objects
(RegExp.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(RegExp.prototype);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -16,13 +16,8 @@ es5id: 15.2.3.13-2-21
description: >
Object.isExtensible returns true for all built-in objects
(Error.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Error.prototype);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,12 +4,8 @@
/*---
es5id: 15.2.3.13-2-22
description: Object.isExtensible returns true if 'O' is extensible
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
return Object.isExtensible(obj);
}
runTestCase(testcase);
assert(Object.isExtensible(obj), 'Object.isExtensible(obj) !== true');

View File

@ -4,14 +4,9 @@
/*---
es5id: 15.2.3.13-2-23
description: Object.isExtensible returns false if 'O' is not extensible
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
Object.preventExtensions(obj);
return !Object.isExtensible(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isExtensible(obj), false, 'Object.isExtensible(obj)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.13-2-24
description: >
Object.isExtensible returns true if O is extensible and has a
prototype that is extensible
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
var ConstructFun = function () { };
@ -18,6 +15,4 @@ function testcase() {
var obj = new ConstructFun();
return Object.isExtensible(obj);
}
runTestCase(testcase);
assert(Object.isExtensible(obj), 'Object.isExtensible(obj) !== true');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.13-2-25
description: >
Object.isExtensible returns true if O is extensible and has a
prototype that is not extensible
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.preventExtensions(proto);
@ -19,7 +16,4 @@ function testcase() {
var obj = new ConstructFun();
return Object.isExtensible(obj);
}
runTestCase(testcase);
assert(Object.isExtensible(obj), 'Object.isExtensible(obj) !== true');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.13-2-26
description: >
Object.isExtensible returns false if O is not extensible and has a
prototype that is extensible
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
var ConstructFun = function () { };
@ -19,7 +16,4 @@ function testcase() {
Object.preventExtensions(obj);
return !Object.isExtensible(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isExtensible(obj), false, 'Object.isExtensible(obj)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.13-2-27
description: >
Object.isExtensible returns false if O is not extensible and has a
prototype that is not extensible
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.preventExtensions(proto);
@ -20,7 +17,4 @@ function testcase() {
var obj = new ConstructFun();
Object.preventExtensions(obj);
return !Object.isExtensible(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isExtensible(obj), false, 'Object.isExtensible(obj)');

View File

@ -4,14 +4,7 @@
/*---
es5id: 15.2.3.13-2-29
description: Object.isExtensible returns true for the global object
includes:
- runTestCase.js
- fnGlobalObject.js
includes: [fnGlobalObject.js]
---*/
function testcase() {
return Object.isExtensible(fnGlobalObject());
}
runTestCase(testcase);
assert(Object.isExtensible(fnGlobalObject()), 'Object.isExtensible(fnGlobalObject()) !== true');

View File

@ -6,15 +6,10 @@ es5id: 15.2.3.13-2-3
description: >
Object.isExtensible returns true for all built-in objects
(Function)
includes: [runTestCase.js]
---*/
function testcase() {
function foo() {}
var e = Object.isExtensible(foo);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-4
description: Object.isExtensible returns true for all built-in objects (Array)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Array);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-5
description: Object.isExtensible returns true for all built-in objects (String)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(String);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-6
description: Object.isExtensible returns true for all built-in objects (Boolean)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Boolean);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-7
description: Object.isExtensible returns true for all built-in objects (Number)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Number);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-8
description: Object.isExtensible returns true for all built-in objects (Math)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Math);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.13-2-9
description: Object.isExtensible returns true for all built-in objects (Date)
includes: [runTestCase.js]
---*/
function testcase() {
var e = Object.isExtensible(Date);
if (e === true) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(e, true, 'e');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-0-1
description: Object.isFrozen must exist as a function
includes: [runTestCase.js]
---*/
function testcase() {
var f = Object.isFrozen;
if (typeof(f) === "function") {
return true;
}
}
runTestCase(testcase);
assert.sameValue(typeof(f), "function", 'typeof(f)');

View File

@ -4,12 +4,6 @@
/*---
es5id: 15.2.3.12-0-2
description: Object.isFrozen must exist as a function taking 1 parameter
includes: [runTestCase.js]
---*/
function testcase() {
if (Object.isFrozen.length === 1) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen.length, 1, 'Object.isFrozen.length');

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.12-1-1
description: >
Object.isFrozen - TypeError is not thrown when the first param 'O'
is undefined
includes: [runTestCase.js]
---*/
function testcase() {
Object.isFrozen(undefined);
return true;
}
runTestCase(testcase);

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.12-1-2
description: >
Object.isFrozen - TypeError is not thrown when the first param 'O'
is null
includes: [runTestCase.js]
---*/
function testcase() {
Object.isFrozen(null);
return true;
}
runTestCase(testcase);

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.12-1-3
description: >
Object.isFrozen - TypeError is not thrown when the first param 'O'
is a boolean
includes: [runTestCase.js]
---*/
function testcase() {
Object.isFrozen(true);
return true;
}
runTestCase(testcase);

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.12-1-4
description: >
Object.isFrozen - TypeError is not thrown when the first param 'O'
is a string
includes: [runTestCase.js]
---*/
function testcase() {
Object.isFrozen("abc");
return true;
}
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*---
es5id: 15.2.3.12-1-5
description: Object.isFrozen applies to dense array
includes: [runTestCase.js]
---*/
function testcase() {
var obj = Object.freeze([0, 1, 2]);
return Object.isFrozen(obj);
}
runTestCase(testcase);
assert(Object.isFrozen(obj), 'Object.isFrozen(obj) !== true');

View File

@ -4,14 +4,11 @@
/*---
es5id: 15.2.3.12-1-6
description: Object.isFrozen applies to sparse array
includes: [runTestCase.js]
---*/
function testcase() {
var sparseArr = [0, 1];
sparseArr[10000] = 10000;
sparseArr = Object.freeze(sparseArr);
return Object.isFrozen(sparseArr);
}
runTestCase(testcase);
assert(Object.isFrozen(sparseArr), 'Object.isFrozen(sparseArr) !== true');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-1-7
description: >
Object.isFrozen applies to non-array object which contains index
named properties
includes: [runTestCase.js]
---*/
function testcase() {
var obj = Object.freeze({ 0: 0, 1: 1, 1000: 1000 });
return Object.isFrozen(obj);
}
runTestCase(testcase);
assert(Object.isFrozen(obj), 'Object.isFrozen(obj) !== true');

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.12-1
description: >
Object.isFrozen does not throw TypeError if type of first param is
not Object
includes: [runTestCase.js]
---*/
function testcase() {
Object.isFrozen(0);
return true;
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-1
description: >
Object.isFrozen - inherited data property is not considered into
the for each loop
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.defineProperty(proto, "Father", {
value: 10,
@ -25,7 +22,4 @@ function testcase() {
Object.preventExtensions(child);
return Object.isFrozen(child);
}
runTestCase(testcase);
assert(Object.isFrozen(child), 'Object.isFrozen(child) !== true');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-2
description: >
Object.isFrozen - inherited accessor property is not considered
into the for each loop
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
function get_func() {
@ -31,7 +28,4 @@ function testcase() {
Object.preventExtensions(child);
return Object.isFrozen(child);
}
runTestCase(testcase);
assert(Object.isFrozen(child), 'Object.isFrozen(child) !== true');

View File

@ -4,11 +4,8 @@
/*---
es5id: 15.2.3.12-2-a-1
description: Object.isFrozen - 'P' is own data property
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
Object.defineProperty(obj, "foo", {
@ -19,6 +16,4 @@ function testcase() {
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -4,11 +4,8 @@
/*---
es5id: 15.2.3.12-2-a-11
description: Object.isFrozen - 'O' is the Arguments object
includes: [runTestCase.js]
---*/
function testcase() {
var arg;
(function fun() {
@ -16,6 +13,5 @@ function testcase() {
}(1, 2, 3));
Object.preventExtensions(arg);
return !Object.isFrozen(arg);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(arg), false, 'Object.isFrozen(arg)');

View File

@ -4,17 +4,12 @@
/*---
es5id: 15.2.3.12-2-a-12
description: Object.isFrozen - 'O' is a String object
includes: [runTestCase.js]
---*/
function testcase() {
var obj = new String("abc");
obj.len = 100;
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -4,11 +4,8 @@
/*---
es5id: 15.2.3.12-2-a-13
description: Object.isFrozen - 'O' is a Function object
includes: [runTestCase.js]
---*/
function testcase() {
var obj = function () { };
Object.defineProperty(obj, "property", {
@ -19,6 +16,4 @@ function testcase() {
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -4,16 +4,11 @@
/*---
es5id: 15.2.3.12-2-a-14
description: Object.isFrozen - 'O' is an Array object
includes: [runTestCase.js]
---*/
function testcase() {
var obj = [2];
obj.len = 200;
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-a-2
description: >
Object.isFrozen - 'P' is own data property that overrides an
inherited data property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.defineProperty(proto, "foo", {
@ -30,6 +27,5 @@ function testcase() {
});
Object.preventExtensions(child);
return !Object.isFrozen(child);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(child), false, 'Object.isFrozen(child)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-a-3
description: >
Object.isFrozen - 'P' is own data property that overrides an
inherited accessor property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.defineProperty(proto, "foo", {
@ -31,6 +28,5 @@ function testcase() {
});
Object.preventExtensions(child);
return !Object.isFrozen(child);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(child), false, 'Object.isFrozen(child)');

View File

@ -4,11 +4,8 @@
/*---
es5id: 15.2.3.12-2-a-4
description: Object.isFrozen - 'P' is own accessor property
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
Object.defineProperty(obj, "foo", {
get: function () {
@ -18,6 +15,5 @@ function testcase() {
});
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-a-5
description: >
Object.isFrozen - 'P' is own accessor property that overrides an
inherited data property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.defineProperty(proto, "foo", {
@ -30,6 +27,5 @@ function testcase() {
});
Object.preventExtensions(child);
return !Object.isFrozen(child);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(child), false, 'Object.isFrozen(child)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-a-6
description: >
Object.isFrozen - 'P' is own accessor property that overrides an
inherited accessor property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.defineProperty(proto, "foo", {
@ -33,6 +30,5 @@ function testcase() {
});
Object.preventExtensions(child);
return !Object.isFrozen(child);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(child), false, 'Object.isFrozen(child)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-a-7
description: >
Object.isFrozen - 'P' is own accessor property without a get
function
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
Object.defineProperty(obj, "foo", {
set: function () { },
@ -18,6 +15,5 @@ function testcase() {
});
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-a-8
description: >
Object.isFrozen - 'P' is own accessor property without a get
function that overrides an inherited accessor property
includes: [runTestCase.js]
---*/
function testcase() {
var proto = {};
Object.defineProperty(proto, "foo", {
@ -30,6 +27,5 @@ function testcase() {
});
Object.preventExtensions(child);
return !Object.isFrozen(child);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(child), false, 'Object.isFrozen(child)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-b-i-1
description: >
Object.isFrozen returns false if 'O' contains own writable data
property
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
Object.defineProperty(obj, "foo", {
value: 20,
@ -18,7 +15,5 @@ function testcase() {
configurable: false
});
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-c-1
description: >
Object.isFrozen returns false if 'O' contains own configurable
data property
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
Object.defineProperty(obj, "foo", {
value: 20,
@ -19,7 +16,5 @@ function testcase() {
});
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-2-c-2
description: >
Object.isFrozen returns false if 'O' contains own configurable
accessor property
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
function get_func() {
@ -25,7 +22,5 @@ function testcase() {
});
Object.preventExtensions(obj);
return !Object.isFrozen(obj);
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen(obj), false, 'Object.isFrozen(obj)');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-10
description: Object.isFrozen returns false for all built-in objects (Boolean)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Boolean);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-11
description: >
Object.isFrozen returns false for all built-in objects
(Boolean.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Boolean.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-12
description: Object.isFrozen returns false for all built-in objects (Number)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Number);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-13
description: >
Object.isFrozen returns false for all built-in objects
(Number.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Number.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-14
description: Object.isFrozen returns false for all built-in objects (Math)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Math);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-15
description: Object.isFrozen returns false for all built-in objects (Date)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Date);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-16
description: >
Object.isFrozen returns false for all built-in objects
(Date.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Date.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-17
description: Object.isFrozen returns false for all built-in objects (RegExp)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(RegExp);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-18
description: >
Object.isFrozen returns false for all built-in objects
(RegExp.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(RegExp.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-19
description: Object.isFrozen returns false for all built-in objects (Error)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Error);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-2
description: Object.isFrozen returns false for all built-in objects (Object)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Object);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-20
description: >
Object.isFrozen returns false for all built-in objects
(Error.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Error.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-21
description: Object.isFrozen returns false for all built-in objects (EvalError)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(EvalError);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-22
description: Object.isFrozen returns false for all built-in objects (RangeError)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(RangeError);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-23
description: >
Object.isFrozen returns false for all built-in objects
(ReferenceError)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(ReferenceError);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-24
description: >
Object.isFrozen returns false for all built-in objects
(SyntaxError)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(SyntaxError);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-25
description: Object.isFrozen returns false for all built-in objects (TypeError)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(TypeError);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-26
description: Object.isFrozen returns false for all built-in objects (URIError)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(URIError);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-27
description: Object.isFrozen returns false for all built-in objects (JSON)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(JSON);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,11 +6,8 @@ es5id: 15.2.3.12-3-28
description: >
Object.isFrozen returns true when all own properties of 'O' are
not writable and not configurable, and 'O' is not extensible
includes: [runTestCase.js]
---*/
function testcase() {
var obj = {};
Object.defineProperty(obj, "foo1", {
@ -33,7 +30,5 @@ function testcase() {
});
Object.preventExtensions(obj);
return Object.isFrozen(obj);
}
runTestCase(testcase);
assert(Object.isFrozen(obj), 'Object.isFrozen(obj) !== true');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-3
description: >
Object.isFrozen returns false for all built-in objects
(Object.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Object.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-4
description: Object.isFrozen returns false for all built-in objects (Function)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Function);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-5
description: >
Object.isFrozen returns false for all built-in objects
(Function.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Function.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-6
description: Object.isFrozen returns false for all built-in objects (Array)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Array);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-7
description: >
Object.isFrozen returns false for all built-in objects
(Array.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(Array.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.12-3-8
description: Object.isFrozen returns false for all built-in objects (String)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(String);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.12-3-9
description: >
Object.isFrozen returns false for all built-in objects
(String.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isFrozen(String.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,10 +4,6 @@
/*---
es5id: 15.2.3.12-4-1
description: Object.isFrozen returns false if extensible is true
includes: [runTestCase.js]
---*/
function testcase() {
return !Object.isFrozen({});
}
runTestCase(testcase);
assert.sameValue(Object.isFrozen({}), false, 'Object.isFrozen({})');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.11-0-1
description: Object.isSealed must exist as a function
includes: [runTestCase.js]
---*/
function testcase() {
var f = Object.isSealed;
if (typeof(f) === "function") {
return true;
}
}
runTestCase(testcase);
assert.sameValue(typeof(f), "function", 'typeof(f)');

View File

@ -4,12 +4,6 @@
/*---
es5id: 15.2.3.11-0-2
description: Object.isSealed must exist as a function taking 1 parameter
includes: [runTestCase.js]
---*/
function testcase() {
if (Object.isSealed.length === 1) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(Object.isSealed.length, 1, 'Object.isSealed.length');

View File

@ -6,11 +6,6 @@ es5id: 15.2.3.11-1
description: >
Object.isSealed does not throw TypeError if type of first param is
not Object
includes: [runTestCase.js]
---*/
function testcase() {
Object.isSealed(0);
return true;
}
runTestCase(testcase);

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.11-4-10
description: Object.isSealed returns false for all built-in objects (Boolean)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isSealed(Boolean);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.11-4-11
description: >
Object.isSealed returns false for all built-in objects
(Boolean.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isSealed(Boolean.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.11-4-12
description: Object.isSealed returns false for all built-in objects (Number)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isSealed(Number);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.11-4-13
description: >
Object.isSealed returns false for all built-in objects
(Number.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isSealed(Number.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.11-4-14
description: Object.isSealed returns false for all built-in objects (Math)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isSealed(Math);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -4,13 +4,8 @@
/*---
es5id: 15.2.3.11-4-15
description: Object.isSealed returns false for all built-in objects (Date)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isSealed(Date);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

View File

@ -6,13 +6,8 @@ es5id: 15.2.3.11-4-16
description: >
Object.isSealed returns false for all built-in objects
(Date.prototype)
includes: [runTestCase.js]
---*/
function testcase() {
var b = Object.isSealed(Date.prototype);
if (b === false) {
return true;
}
}
runTestCase(testcase);
assert.sameValue(b, false, 'b');

Some files were not shown because too many files have changed in this diff Show More