Add basic surface tests for NativeErrors

This commit is contained in:
André Bargull 2016-01-15 18:13:36 +01:00
parent 1bac79fbf3
commit 33395b52f5
72 changed files with 1326 additions and 0 deletions

View File

@ -0,0 +1,10 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
EvalError is a constructor function.
---*/
assert.sameValue(typeof EvalError, 'function', 'typeof EvalError is "function"');

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
The prototype of EvalError instances is EvalError.prototype.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.getPrototypeOf(new EvalError), EvalError.prototype);

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
EvalError instances have an [[ErrorData]] internal slot.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.prototype.toString.call(new EvalError), "[object Error]");

View File

@ -0,0 +1,32 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
EvalError.length is 1.
info: >
NativeError ( message )
19.5.6.2 Properties of the NativeError Constructors
Besides the length property (whose value is 1) [...].
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form ...name
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(EvalError.length, 1);
verifyNotEnumerable(EvalError, "length");
verifyNotWritable(EvalError, "length");
verifyConfigurable(EvalError, "length");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
EvalError.name is "EvalError".
info: >
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(EvalError.name, "EvalError");
verifyNotEnumerable(EvalError, "name");
verifyNotWritable(EvalError, "name");
verifyConfigurable(EvalError, "name");

View File

@ -0,0 +1,12 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
The prototype of EvalError is Error.
info: >
The value of the [[Prototype]] internal slot of a NativeError constructor is the intrinsic object %Error% (19.5.1).
---*/
assert.sameValue(Object.getPrototypeOf(EvalError), Error);

View File

@ -0,0 +1,19 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2.1
description: >
The initial value of EvalError.prototype is the EvalError prototype object.
info: >
The initial value of NativeError.prototype is a NativeError prototype object (19.5.6.3).
Each NativeError constructor has a distinct prototype object.
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
includes: [propertyHelper.js]
---*/
assert.sameValue(EvalError.prototype, Object.getPrototypeOf(new EvalError));
verifyNotEnumerable(EvalError, "prototype");
verifyNotWritable(EvalError, "prototype");
verifyNotConfigurable(EvalError, "prototype");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.1
description: >
The initial value of EvalError.prototype.constructor is the EvalError object.
info: >
The initial value of the constructor property of the prototype for a given NativeError
constructor is the corresponding intrinsic object %NativeError% (19.5.6.1).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(EvalError.prototype.constructor, EvalError);
verifyNotEnumerable(EvalError.prototype, "constructor");
verifyWritable(EvalError.prototype, "constructor");
verifyConfigurable(EvalError.prototype, "constructor");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.2
description: >
The initial value of EvalError.prototype.message is the empty string.
info: >
The initial value of the message property of the prototype for a given NativeError
constructor is the empty String.
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(EvalError.prototype.message, "");
verifyNotEnumerable(EvalError.prototype, "message");
verifyWritable(EvalError.prototype, "message");
verifyConfigurable(EvalError.prototype, "message");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.3
description: >
The initial value of EvalError.prototype.name is "EvalError".
info: >
The initial value of the name property of the prototype for a given NativeError
constructor is a string consisting of the name of the constructor (the name used
instead of NativeError).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(EvalError.prototype.name, "EvalError");
verifyNotEnumerable(EvalError.prototype, "name");
verifyWritable(EvalError.prototype, "name");
verifyConfigurable(EvalError.prototype, "name");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
EvalError.prototype is not an error object instance.
info: >
Each NativeError prototype object is an ordinary object. It is not an
Error instance and does not have an [[ErrorData]] internal slot.
---*/
assert.sameValue(Object.prototype.toString.call(EvalError.prototype), "[object Object]");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
The prototype of EvalError.prototype is Error.prototype.
info: >
The value of the [[Prototype]] internal slot of each NativeError prototype
object is the intrinsic object %ErrorPrototype% (19.5.3).
---*/
assert.sameValue(Object.getPrototypeOf(EvalError.prototype), Error.prototype);

View File

@ -0,0 +1,10 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
RangeError is a constructor function.
---*/
assert.sameValue(typeof RangeError, 'function', 'typeof RangeError is "function"');

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
The prototype of RangeError instances is RangeError.prototype.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.getPrototypeOf(new RangeError), RangeError.prototype);

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
RangeError instances have an [[ErrorData]] internal slot.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.prototype.toString.call(new RangeError), "[object Error]");

View File

@ -0,0 +1,32 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
RangeError.length is 1.
info: >
NativeError ( message )
19.5.6.2 Properties of the NativeError Constructors
Besides the length property (whose value is 1) [...].
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form ...name
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(RangeError.length, 1);
verifyNotEnumerable(RangeError, "length");
verifyNotWritable(RangeError, "length");
verifyConfigurable(RangeError, "length");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
RangeError.name is "RangeError".
info: >
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(RangeError.name, "RangeError");
verifyNotEnumerable(RangeError, "name");
verifyNotWritable(RangeError, "name");
verifyConfigurable(RangeError, "name");

View File

@ -0,0 +1,12 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
The prototype of RangeError is Error.
info: >
The value of the [[Prototype]] internal slot of a NativeError constructor is the intrinsic object %Error% (19.5.1).
---*/
assert.sameValue(Object.getPrototypeOf(RangeError), Error);

View File

@ -0,0 +1,19 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2.1
description: >
The initial value of RangeError.prototype is the RangeError prototype object.
info: >
The initial value of NativeError.prototype is a NativeError prototype object (19.5.6.3).
Each NativeError constructor has a distinct prototype object.
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
includes: [propertyHelper.js]
---*/
assert.sameValue(RangeError.prototype, Object.getPrototypeOf(new RangeError));
verifyNotEnumerable(RangeError, "prototype");
verifyNotWritable(RangeError, "prototype");
verifyNotConfigurable(RangeError, "prototype");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.1
description: >
The initial value of RangeError.prototype.constructor is the RangeError object.
info: >
The initial value of the constructor property of the prototype for a given NativeError
constructor is the corresponding intrinsic object %NativeError% (19.5.6.1).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(RangeError.prototype.constructor, RangeError);
verifyNotEnumerable(RangeError.prototype, "constructor");
verifyWritable(RangeError.prototype, "constructor");
verifyConfigurable(RangeError.prototype, "constructor");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.2
description: >
The initial value of RangeError.prototype.message is the empty string.
info: >
The initial value of the message property of the prototype for a given NativeError
constructor is the empty String.
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(RangeError.prototype.message, "");
verifyNotEnumerable(RangeError.prototype, "message");
verifyWritable(RangeError.prototype, "message");
verifyConfigurable(RangeError.prototype, "message");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.3
description: >
The initial value of RangeError.prototype.name is "RangeError".
info: >
The initial value of the name property of the prototype for a given NativeError
constructor is a string consisting of the name of the constructor (the name used
instead of NativeError).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(RangeError.prototype.name, "RangeError");
verifyNotEnumerable(RangeError.prototype, "name");
verifyWritable(RangeError.prototype, "name");
verifyConfigurable(RangeError.prototype, "name");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
RangeError.prototype is not an error object instance.
info: >
Each NativeError prototype object is an ordinary object. It is not an
Error instance and does not have an [[ErrorData]] internal slot.
---*/
assert.sameValue(Object.prototype.toString.call(RangeError.prototype), "[object Object]");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
The prototype of RangeError.prototype is Error.prototype.
info: >
The value of the [[Prototype]] internal slot of each NativeError prototype
object is the intrinsic object %ErrorPrototype% (19.5.3).
---*/
assert.sameValue(Object.getPrototypeOf(RangeError.prototype), Error.prototype);

View File

@ -0,0 +1,10 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
ReferenceError is a constructor function.
---*/
assert.sameValue(typeof ReferenceError, 'function', 'typeof ReferenceError is "function"');

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
The prototype of ReferenceError instances is ReferenceError.prototype.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.getPrototypeOf(new ReferenceError), ReferenceError.prototype);

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
ReferenceError instances have an [[ErrorData]] internal slot.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.prototype.toString.call(new ReferenceError), "[object Error]");

View File

@ -0,0 +1,32 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
ReferenceError.length is 1.
info: >
NativeError ( message )
19.5.6.2 Properties of the NativeError Constructors
Besides the length property (whose value is 1) [...].
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form ...name
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(ReferenceError.length, 1);
verifyNotEnumerable(ReferenceError, "length");
verifyNotWritable(ReferenceError, "length");
verifyConfigurable(ReferenceError, "length");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
ReferenceError.name is "ReferenceError".
info: >
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(ReferenceError.name, "ReferenceError");
verifyNotEnumerable(ReferenceError, "name");
verifyNotWritable(ReferenceError, "name");
verifyConfigurable(ReferenceError, "name");

View File

@ -0,0 +1,12 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
The prototype of ReferenceError is Error.
info: >
The value of the [[Prototype]] internal slot of a NativeError constructor is the intrinsic object %Error% (19.5.1).
---*/
assert.sameValue(Object.getPrototypeOf(ReferenceError), Error);

View File

@ -0,0 +1,19 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2.1
description: >
The initial value of ReferenceError.prototype is the ReferenceError prototype object.
info: >
The initial value of NativeError.prototype is a NativeError prototype object (19.5.6.3).
Each NativeError constructor has a distinct prototype object.
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
includes: [propertyHelper.js]
---*/
assert.sameValue(ReferenceError.prototype, Object.getPrototypeOf(new ReferenceError));
verifyNotEnumerable(ReferenceError, "prototype");
verifyNotWritable(ReferenceError, "prototype");
verifyNotConfigurable(ReferenceError, "prototype");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.1
description: >
The initial value of ReferenceError.prototype.constructor is the ReferenceError object.
info: >
The initial value of the constructor property of the prototype for a given NativeError
constructor is the corresponding intrinsic object %NativeError% (19.5.6.1).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(ReferenceError.prototype.constructor, ReferenceError);
verifyNotEnumerable(ReferenceError.prototype, "constructor");
verifyWritable(ReferenceError.prototype, "constructor");
verifyConfigurable(ReferenceError.prototype, "constructor");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.2
description: >
The initial value of ReferenceError.prototype.message is the empty string.
info: >
The initial value of the message property of the prototype for a given NativeError
constructor is the empty String.
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(ReferenceError.prototype.message, "");
verifyNotEnumerable(ReferenceError.prototype, "message");
verifyWritable(ReferenceError.prototype, "message");
verifyConfigurable(ReferenceError.prototype, "message");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.3
description: >
The initial value of ReferenceError.prototype.name is "ReferenceError".
info: >
The initial value of the name property of the prototype for a given NativeError
constructor is a string consisting of the name of the constructor (the name used
instead of NativeError).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(ReferenceError.prototype.name, "ReferenceError");
verifyNotEnumerable(ReferenceError.prototype, "name");
verifyWritable(ReferenceError.prototype, "name");
verifyConfigurable(ReferenceError.prototype, "name");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
ReferenceError.prototype is not an error object instance.
info: >
Each NativeError prototype object is an ordinary object. It is not an
Error instance and does not have an [[ErrorData]] internal slot.
---*/
assert.sameValue(Object.prototype.toString.call(ReferenceError.prototype), "[object Object]");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
The prototype of ReferenceError.prototype is Error.prototype.
info: >
The value of the [[Prototype]] internal slot of each NativeError prototype
object is the intrinsic object %ErrorPrototype% (19.5.3).
---*/
assert.sameValue(Object.getPrototypeOf(ReferenceError.prototype), Error.prototype);

View File

@ -0,0 +1,10 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
SyntaxError is a constructor function.
---*/
assert.sameValue(typeof SyntaxError, 'function', 'typeof SyntaxError is "function"');

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
The prototype of SyntaxError instances is SyntaxError.prototype.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.getPrototypeOf(new SyntaxError), SyntaxError.prototype);

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
SyntaxError instances have an [[ErrorData]] internal slot.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.prototype.toString.call(new SyntaxError), "[object Error]");

View File

@ -0,0 +1,32 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
SyntaxError.length is 1.
info: >
NativeError ( message )
19.5.6.2 Properties of the NativeError Constructors
Besides the length property (whose value is 1) [...].
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form ...name
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(SyntaxError.length, 1);
verifyNotEnumerable(SyntaxError, "length");
verifyNotWritable(SyntaxError, "length");
verifyConfigurable(SyntaxError, "length");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
SyntaxError.name is "SyntaxError".
info: >
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(SyntaxError.name, "SyntaxError");
verifyNotEnumerable(SyntaxError, "name");
verifyNotWritable(SyntaxError, "name");
verifyConfigurable(SyntaxError, "name");

View File

@ -0,0 +1,12 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
The prototype of SyntaxError is Error.
info: >
The value of the [[Prototype]] internal slot of a NativeError constructor is the intrinsic object %Error% (19.5.1).
---*/
assert.sameValue(Object.getPrototypeOf(SyntaxError), Error);

View File

@ -0,0 +1,19 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2.1
description: >
The initial value of SyntaxError.prototype is the SyntaxError prototype object.
info: >
The initial value of NativeError.prototype is a NativeError prototype object (19.5.6.3).
Each NativeError constructor has a distinct prototype object.
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
includes: [propertyHelper.js]
---*/
assert.sameValue(SyntaxError.prototype, Object.getPrototypeOf(new SyntaxError));
verifyNotEnumerable(SyntaxError, "prototype");
verifyNotWritable(SyntaxError, "prototype");
verifyNotConfigurable(SyntaxError, "prototype");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.1
description: >
The initial value of SyntaxError.prototype.constructor is the SyntaxError object.
info: >
The initial value of the constructor property of the prototype for a given NativeError
constructor is the corresponding intrinsic object %NativeError% (19.5.6.1).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(SyntaxError.prototype.constructor, SyntaxError);
verifyNotEnumerable(SyntaxError.prototype, "constructor");
verifyWritable(SyntaxError.prototype, "constructor");
verifyConfigurable(SyntaxError.prototype, "constructor");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.2
description: >
The initial value of SyntaxError.prototype.message is the empty string.
info: >
The initial value of the message property of the prototype for a given NativeError
constructor is the empty String.
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(SyntaxError.prototype.message, "");
verifyNotEnumerable(SyntaxError.prototype, "message");
verifyWritable(SyntaxError.prototype, "message");
verifyConfigurable(SyntaxError.prototype, "message");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.3
description: >
The initial value of SyntaxError.prototype.name is "SyntaxError".
info: >
The initial value of the name property of the prototype for a given NativeError
constructor is a string consisting of the name of the constructor (the name used
instead of NativeError).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(SyntaxError.prototype.name, "SyntaxError");
verifyNotEnumerable(SyntaxError.prototype, "name");
verifyWritable(SyntaxError.prototype, "name");
verifyConfigurable(SyntaxError.prototype, "name");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
SyntaxError.prototype is not an error object instance.
info: >
Each NativeError prototype object is an ordinary object. It is not an
Error instance and does not have an [[ErrorData]] internal slot.
---*/
assert.sameValue(Object.prototype.toString.call(SyntaxError.prototype), "[object Object]");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
The prototype of SyntaxError.prototype is Error.prototype.
info: >
The value of the [[Prototype]] internal slot of each NativeError prototype
object is the intrinsic object %ErrorPrototype% (19.5.3).
---*/
assert.sameValue(Object.getPrototypeOf(SyntaxError.prototype), Error.prototype);

View File

@ -0,0 +1,10 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
TypeError is a constructor function.
---*/
assert.sameValue(typeof TypeError, 'function', 'typeof TypeError is "function"');

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
The prototype of TypeError instances is TypeError.prototype.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.getPrototypeOf(new TypeError), TypeError.prototype);

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
TypeError instances have an [[ErrorData]] internal slot.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.prototype.toString.call(new TypeError), "[object Error]");

View File

@ -0,0 +1,32 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
TypeError.length is 1.
info: >
NativeError ( message )
19.5.6.2 Properties of the NativeError Constructors
Besides the length property (whose value is 1) [...].
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form ...name
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(TypeError.length, 1);
verifyNotEnumerable(TypeError, "length");
verifyNotWritable(TypeError, "length");
verifyConfigurable(TypeError, "length");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
TypeError.name is "TypeError".
info: >
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(TypeError.name, "TypeError");
verifyNotEnumerable(TypeError, "name");
verifyNotWritable(TypeError, "name");
verifyConfigurable(TypeError, "name");

View File

@ -0,0 +1,12 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
The prototype of TypeError is Error.
info: >
The value of the [[Prototype]] internal slot of a NativeError constructor is the intrinsic object %Error% (19.5.1).
---*/
assert.sameValue(Object.getPrototypeOf(TypeError), Error);

View File

@ -0,0 +1,19 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2.1
description: >
The initial value of TypeError.prototype is the TypeError prototype object.
info: >
The initial value of NativeError.prototype is a NativeError prototype object (19.5.6.3).
Each NativeError constructor has a distinct prototype object.
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
includes: [propertyHelper.js]
---*/
assert.sameValue(TypeError.prototype, Object.getPrototypeOf(new TypeError));
verifyNotEnumerable(TypeError, "prototype");
verifyNotWritable(TypeError, "prototype");
verifyNotConfigurable(TypeError, "prototype");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.1
description: >
The initial value of TypeError.prototype.constructor is the TypeError object.
info: >
The initial value of the constructor property of the prototype for a given NativeError
constructor is the corresponding intrinsic object %NativeError% (19.5.6.1).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(TypeError.prototype.constructor, TypeError);
verifyNotEnumerable(TypeError.prototype, "constructor");
verifyWritable(TypeError.prototype, "constructor");
verifyConfigurable(TypeError.prototype, "constructor");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.2
description: >
The initial value of TypeError.prototype.message is the empty string.
info: >
The initial value of the message property of the prototype for a given NativeError
constructor is the empty String.
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(TypeError.prototype.message, "");
verifyNotEnumerable(TypeError.prototype, "message");
verifyWritable(TypeError.prototype, "message");
verifyConfigurable(TypeError.prototype, "message");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.3
description: >
The initial value of TypeError.prototype.name is "TypeError".
info: >
The initial value of the name property of the prototype for a given NativeError
constructor is a string consisting of the name of the constructor (the name used
instead of NativeError).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(TypeError.prototype.name, "TypeError");
verifyNotEnumerable(TypeError.prototype, "name");
verifyWritable(TypeError.prototype, "name");
verifyConfigurable(TypeError.prototype, "name");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
TypeError.prototype is not an error object instance.
info: >
Each NativeError prototype object is an ordinary object. It is not an
Error instance and does not have an [[ErrorData]] internal slot.
---*/
assert.sameValue(Object.prototype.toString.call(TypeError.prototype), "[object Object]");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
The prototype of TypeError.prototype is Error.prototype.
info: >
The value of the [[Prototype]] internal slot of each NativeError prototype
object is the intrinsic object %ErrorPrototype% (19.5.3).
---*/
assert.sameValue(Object.getPrototypeOf(TypeError.prototype), Error.prototype);

View File

@ -0,0 +1,10 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
URIError is a constructor function.
---*/
assert.sameValue(typeof URIError, 'function', 'typeof URIError is "function"');

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
The prototype of URIError instances is URIError.prototype.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.getPrototypeOf(new URIError), URIError.prototype);

View File

@ -0,0 +1,14 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.4
description: >
URIError instances have an [[ErrorData]] internal slot.
info: >
NativeError instances are ordinary objects that inherit properties
from their NativeError prototype object and have an [[ErrorData]]
internal slot whose value is undefined
---*/
assert.sameValue(Object.prototype.toString.call(new URIError), "[object Error]");

View File

@ -0,0 +1,32 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
URIError.length is 1.
info: >
NativeError ( message )
19.5.6.2 Properties of the NativeError Constructors
Besides the length property (whose value is 1) [...].
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description, including optional
parameters. However, rest parameters shown using the form ...name
are not included in the default argument count.
Unless otherwise specified, the length property of a built-in Function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(URIError.length, 1);
verifyNotEnumerable(URIError, "length");
verifyNotWritable(URIError, "length");
verifyConfigurable(URIError, "length");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.1
description: >
URIError.name is "URIError".
info: >
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
---*/
assert.sameValue(URIError.name, "URIError");
verifyNotEnumerable(URIError, "name");
verifyNotWritable(URIError, "name");
verifyConfigurable(URIError, "name");

View File

@ -0,0 +1,12 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2
description: >
The prototype of URIError is Error.
info: >
The value of the [[Prototype]] internal slot of a NativeError constructor is the intrinsic object %Error% (19.5.1).
---*/
assert.sameValue(Object.getPrototypeOf(URIError), Error);

View File

@ -0,0 +1,19 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.2.1
description: >
The initial value of URIError.prototype is the URIError prototype object.
info: >
The initial value of NativeError.prototype is a NativeError prototype object (19.5.6.3).
Each NativeError constructor has a distinct prototype object.
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
includes: [propertyHelper.js]
---*/
assert.sameValue(URIError.prototype, Object.getPrototypeOf(new URIError));
verifyNotEnumerable(URIError, "prototype");
verifyNotWritable(URIError, "prototype");
verifyNotConfigurable(URIError, "prototype");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.1
description: >
The initial value of URIError.prototype.constructor is the URIError object.
info: >
The initial value of the constructor property of the prototype for a given NativeError
constructor is the corresponding intrinsic object %NativeError% (19.5.6.1).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(URIError.prototype.constructor, URIError);
verifyNotEnumerable(URIError.prototype, "constructor");
verifyWritable(URIError.prototype, "constructor");
verifyConfigurable(URIError.prototype, "constructor");

View File

@ -0,0 +1,23 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.2
description: >
The initial value of URIError.prototype.message is the empty string.
info: >
The initial value of the message property of the prototype for a given NativeError
constructor is the empty String.
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(URIError.prototype.message, "");
verifyNotEnumerable(URIError.prototype, "message");
verifyWritable(URIError.prototype, "message");
verifyConfigurable(URIError.prototype, "message");

View File

@ -0,0 +1,24 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3.3
description: >
The initial value of URIError.prototype.name is "URIError".
info: >
The initial value of the name property of the prototype for a given NativeError
constructor is a string consisting of the name of the constructor (the name used
instead of NativeError).
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has
the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
---*/
assert.sameValue(URIError.prototype.name, "URIError");
verifyNotEnumerable(URIError.prototype, "name");
verifyWritable(URIError.prototype, "name");
verifyConfigurable(URIError.prototype, "name");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
URIError.prototype is not an error object instance.
info: >
Each NativeError prototype object is an ordinary object. It is not an
Error instance and does not have an [[ErrorData]] internal slot.
---*/
assert.sameValue(Object.prototype.toString.call(URIError.prototype), "[object Object]");

View File

@ -0,0 +1,13 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 19.5.6.3
description: >
The prototype of URIError.prototype is Error.prototype.
info: >
The value of the [[Prototype]] internal slot of each NativeError prototype
object is the intrinsic object %ErrorPrototype% (19.5.3).
---*/
assert.sameValue(Object.getPrototypeOf(URIError.prototype), Error.prototype);