Add missing tests for "length" and "name" properties of AnnexB built-in functions

This commit is contained in:
André Bargull 2016-01-15 18:11:38 +01:00
parent 5e3eed63b9
commit bb1bda6dfd
40 changed files with 1100 additions and 0 deletions

29
test/annexB/Date/prototype/getYear/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.4.1
description: >
Date.prototype.getYear.length is 0.
info: >
Date.prototype.getYear ( )
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(Date.prototype.getYear.length, 0);
verifyNotEnumerable(Date.prototype.getYear, "length");
verifyNotWritable(Date.prototype.getYear, "length");
verifyConfigurable(Date.prototype.getYear, "length");

26
test/annexB/Date/prototype/getYear/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.4.1
description: >
Date.prototype.getYear.name is "getYear".
info: >
Date.prototype.getYear ( )
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(Date.prototype.getYear.name, "getYear");
verifyNotEnumerable(Date.prototype.getYear, "name");
verifyNotWritable(Date.prototype.getYear, "name");
verifyConfigurable(Date.prototype.getYear, "name");

29
test/annexB/Date/prototype/setYear/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.4.2
description: >
Date.prototype.setYear.length is 1.
info: >
Date.prototype.setYear ( )
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(Date.prototype.setYear.length, 1);
verifyNotEnumerable(Date.prototype.setYear, "length");
verifyNotWritable(Date.prototype.setYear, "length");
verifyConfigurable(Date.prototype.setYear, "length");

26
test/annexB/Date/prototype/setYear/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.4.2
description: >
Date.prototype.setYear.name is "setYear".
info: >
Date.prototype.setYear ( )
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(Date.prototype.setYear.name, "setYear");
verifyNotEnumerable(Date.prototype.setYear, "name");
verifyNotWritable(Date.prototype.setYear, "name");
verifyConfigurable(Date.prototype.setYear, "name");

View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.4.3
description: >
Date.prototype.toGMTString.length is 0.
info: >
Date.prototype.toGMTString ( )
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(Date.prototype.toGMTString.length, 0);
verifyNotEnumerable(Date.prototype.toGMTString, "length");
verifyNotWritable(Date.prototype.toGMTString, "length");
verifyConfigurable(Date.prototype.toGMTString, "length");

View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.4.3
description: >
Date.prototype.toGMTString.name is "toUTCString".
info: >
Date.prototype.toGMTString ( )
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(Date.prototype.toGMTString.name, "toUTCString");
verifyNotEnumerable(Date.prototype.toGMTString, "name");
verifyNotWritable(Date.prototype.toGMTString, "name");
verifyConfigurable(Date.prototype.toGMTString, "name");

View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.5.1
description: >
RegExp.prototype.compile.length is 2.
info: >
RegExp.prototype.compile (pattern, flags )
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(RegExp.prototype.compile.length, 2);
verifyNotEnumerable(RegExp.prototype.compile, "length");
verifyNotWritable(RegExp.prototype.compile, "length");
verifyConfigurable(RegExp.prototype.compile, "length");

26
test/annexB/RegExp/prototype/compile/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.5.1
description: >
RegExp.prototype.compile.name is "compile".
info: >
RegExp.prototype.compile (pattern, flags )
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(RegExp.prototype.compile.name, "compile");
verifyNotEnumerable(RegExp.prototype.compile, "name");
verifyNotWritable(RegExp.prototype.compile, "name");
verifyConfigurable(RegExp.prototype.compile, "name");

29
test/annexB/String/prototype/anchor/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.2
description: >
String.prototype.anchor.length is 1.
info: >
String.prototype.anchor ( name )
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(String.prototype.anchor.length, 1);
verifyNotEnumerable(String.prototype.anchor, "length");
verifyNotWritable(String.prototype.anchor, "length");
verifyConfigurable(String.prototype.anchor, "length");

26
test/annexB/String/prototype/anchor/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.2
description: >
String.prototype.anchor.name is "anchor".
info: >
String.prototype.anchor ( name )
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(String.prototype.anchor.name, "anchor");
verifyNotEnumerable(String.prototype.anchor, "name");
verifyNotWritable(String.prototype.anchor, "name");
verifyConfigurable(String.prototype.anchor, "name");

29
test/annexB/String/prototype/big/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.3
description: >
String.prototype.big.length is 0.
info: >
String.prototype.big ( )
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(String.prototype.big.length, 0);
verifyNotEnumerable(String.prototype.big, "length");
verifyNotWritable(String.prototype.big, "length");
verifyConfigurable(String.prototype.big, "length");

26
test/annexB/String/prototype/big/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.3
description: >
String.prototype.big.name is "big".
info: >
String.prototype.big ( )
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(String.prototype.big.name, "big");
verifyNotEnumerable(String.prototype.big, "name");
verifyNotWritable(String.prototype.big, "name");
verifyConfigurable(String.prototype.big, "name");

29
test/annexB/String/prototype/blink/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.4
description: >
String.prototype.blink.length is 0.
info: >
String.prototype.blink ( )
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(String.prototype.blink.length, 0);
verifyNotEnumerable(String.prototype.blink, "length");
verifyNotWritable(String.prototype.blink, "length");
verifyConfigurable(String.prototype.blink, "length");

26
test/annexB/String/prototype/blink/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.4
description: >
String.prototype.blink.name is "blink".
info: >
String.prototype.blink ( )
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(String.prototype.blink.name, "blink");
verifyNotEnumerable(String.prototype.blink, "name");
verifyNotWritable(String.prototype.blink, "name");
verifyConfigurable(String.prototype.blink, "name");

29
test/annexB/String/prototype/bold/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.5
description: >
String.prototype.bold.length is 0.
info: >
String.prototype.bold ( )
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(String.prototype.bold.length, 0);
verifyNotEnumerable(String.prototype.bold, "length");
verifyNotWritable(String.prototype.bold, "length");
verifyConfigurable(String.prototype.bold, "length");

26
test/annexB/String/prototype/bold/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.5
description: >
String.prototype.bold.name is "bold".
info: >
String.prototype.bold ( )
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(String.prototype.bold.name, "bold");
verifyNotEnumerable(String.prototype.bold, "name");
verifyNotWritable(String.prototype.bold, "name");
verifyConfigurable(String.prototype.bold, "name");

29
test/annexB/String/prototype/fixed/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.6
description: >
String.prototype.fixed.length is 0.
info: >
String.prototype.fixed ( )
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(String.prototype.fixed.length, 0);
verifyNotEnumerable(String.prototype.fixed, "length");
verifyNotWritable(String.prototype.fixed, "length");
verifyConfigurable(String.prototype.fixed, "length");

26
test/annexB/String/prototype/fixed/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.6
description: >
String.prototype.fixed.name is "fixed".
info: >
String.prototype.fixed ( )
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(String.prototype.fixed.name, "fixed");
verifyNotEnumerable(String.prototype.fixed, "name");
verifyNotWritable(String.prototype.fixed, "name");
verifyConfigurable(String.prototype.fixed, "name");

View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.7
description: >
String.prototype.fontcolor.length is 1.
info: >
String.prototype.fontcolor ( color )
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(String.prototype.fontcolor.length, 1);
verifyNotEnumerable(String.prototype.fontcolor, "length");
verifyNotWritable(String.prototype.fontcolor, "length");
verifyConfigurable(String.prototype.fontcolor, "length");

View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.7
description: >
String.prototype.fontcolor.name is "fontcolor".
info: >
String.prototype.fontcolor ( color )
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(String.prototype.fontcolor.name, "fontcolor");
verifyNotEnumerable(String.prototype.fontcolor, "name");
verifyNotWritable(String.prototype.fontcolor, "name");
verifyConfigurable(String.prototype.fontcolor, "name");

View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.8
description: >
String.prototype.fontsize.length is 1.
info: >
String.prototype.fontsize ( size )
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(String.prototype.fontsize.length, 1);
verifyNotEnumerable(String.prototype.fontsize, "length");
verifyNotWritable(String.prototype.fontsize, "length");
verifyConfigurable(String.prototype.fontsize, "length");

26
test/annexB/String/prototype/fontsize/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.8
description: >
String.prototype.fontsize.name is "fontsize".
info: >
String.prototype.fontsize ( color )
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(String.prototype.fontsize.name, "fontsize");
verifyNotEnumerable(String.prototype.fontsize, "name");
verifyNotWritable(String.prototype.fontsize, "name");
verifyConfigurable(String.prototype.fontsize, "name");

View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.9
description: >
String.prototype.italics.length is 0.
info: >
String.prototype.italics ( )
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(String.prototype.italics.length, 0);
verifyNotEnumerable(String.prototype.italics, "length");
verifyNotWritable(String.prototype.italics, "length");
verifyConfigurable(String.prototype.italics, "length");

26
test/annexB/String/prototype/italics/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.9
description: >
String.prototype.italics.name is "italics".
info: >
String.prototype.italics ( )
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(String.prototype.italics.name, "italics");
verifyNotEnumerable(String.prototype.italics, "name");
verifyNotWritable(String.prototype.italics, "name");
verifyConfigurable(String.prototype.italics, "name");

29
test/annexB/String/prototype/link/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.10
description: >
String.prototype.link.length is 1.
info: >
String.prototype.link ( url )
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(String.prototype.link.length, 1);
verifyNotEnumerable(String.prototype.link, "length");
verifyNotWritable(String.prototype.link, "length");
verifyConfigurable(String.prototype.link, "length");

26
test/annexB/String/prototype/link/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.10
description: >
String.prototype.link.name is "link".
info: >
String.prototype.link ( url )
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(String.prototype.link.name, "link");
verifyNotEnumerable(String.prototype.link, "name");
verifyNotWritable(String.prototype.link, "name");
verifyConfigurable(String.prototype.link, "name");

29
test/annexB/String/prototype/small/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.11
description: >
String.prototype.small.length is 0.
info: >
String.prototype.small ( )
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(String.prototype.small.length, 0);
verifyNotEnumerable(String.prototype.small, "length");
verifyNotWritable(String.prototype.small, "length");
verifyConfigurable(String.prototype.small, "length");

26
test/annexB/String/prototype/small/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.11
description: >
String.prototype.small.name is "small".
info: >
String.prototype.small ( )
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(String.prototype.small.name, "small");
verifyNotEnumerable(String.prototype.small, "name");
verifyNotWritable(String.prototype.small, "name");
verifyConfigurable(String.prototype.small, "name");

29
test/annexB/String/prototype/strike/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.12
description: >
String.prototype.strike.length is 0.
info: >
String.prototype.strike ( )
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(String.prototype.strike.length, 0);
verifyNotEnumerable(String.prototype.strike, "length");
verifyNotWritable(String.prototype.strike, "length");
verifyConfigurable(String.prototype.strike, "length");

26
test/annexB/String/prototype/strike/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.12
description: >
String.prototype.strike.name is "strike".
info: >
String.prototype.strike ( )
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(String.prototype.strike.name, "strike");
verifyNotEnumerable(String.prototype.strike, "name");
verifyNotWritable(String.prototype.strike, "name");
verifyConfigurable(String.prototype.strike, "name");

29
test/annexB/String/prototype/sub/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.13
description: >
String.prototype.sub.length is 0.
info: >
String.prototype.sub ( )
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(String.prototype.sub.length, 0);
verifyNotEnumerable(String.prototype.sub, "length");
verifyNotWritable(String.prototype.sub, "length");
verifyConfigurable(String.prototype.sub, "length");

26
test/annexB/String/prototype/sub/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.13
description: >
String.prototype.sub.name is "sub".
info: >
String.prototype.sub ( )
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(String.prototype.sub.name, "sub");
verifyNotEnumerable(String.prototype.sub, "name");
verifyNotWritable(String.prototype.sub, "name");
verifyConfigurable(String.prototype.sub, "name");

29
test/annexB/String/prototype/substr/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.1
description: >
String.prototype.substr.length is 2.
info: >
String.prototype.substr (start, length)
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(String.prototype.substr.length, 2);
verifyNotEnumerable(String.prototype.substr, "length");
verifyNotWritable(String.prototype.substr, "length");
verifyConfigurable(String.prototype.substr, "length");

26
test/annexB/String/prototype/substr/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.1
description: >
String.prototype.substr.name is "substr".
info: >
String.prototype.substr (start, length)
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(String.prototype.substr.name, "substr");
verifyNotEnumerable(String.prototype.substr, "name");
verifyNotWritable(String.prototype.substr, "name");
verifyConfigurable(String.prototype.substr, "name");

29
test/annexB/String/prototype/sup/length.js vendored Executable file
View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.14
description: >
String.prototype.sup.length is 0.
info: >
String.prototype.sup ( )
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(String.prototype.sup.length, 0);
verifyNotEnumerable(String.prototype.sup, "length");
verifyNotWritable(String.prototype.sup, "length");
verifyConfigurable(String.prototype.sup, "length");

26
test/annexB/String/prototype/sup/name.js vendored Executable file
View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.3.14
description: >
String.prototype.sup.name is "sup".
info: >
String.prototype.sup ( )
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(String.prototype.sup.name, "sup");
verifyNotEnumerable(String.prototype.sup, "name");
verifyNotWritable(String.prototype.sup, "name");
verifyConfigurable(String.prototype.sup, "name");

View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.1.1
description: >
escape.length is 1.
info: >
escape (string)
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(escape.length, 1);
verifyNotEnumerable(escape, "length");
verifyNotWritable(escape, "length");
verifyConfigurable(escape, "length");

View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.1.1
description: >
escape.name is "escape".
info: >
escape (string)
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(escape.name, "escape");
verifyNotEnumerable(escape, "name");
verifyNotWritable(escape, "name");
verifyConfigurable(escape, "name");

View File

@ -0,0 +1,29 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.1.2
description: >
unescape.length is 1.
info: >
unescape (string)
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(unescape.length, 1);
verifyNotEnumerable(unescape, "length");
verifyNotWritable(unescape, "length");
verifyConfigurable(unescape, "length");

View File

@ -0,0 +1,26 @@
// Copyright (C) 2015 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: B.2.1.2
description: >
unescape.name is "unescape".
info: >
unescape (string)
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(unescape.name, "unescape");
verifyNotEnumerable(unescape, "name");
verifyNotWritable(unescape, "name");
verifyConfigurable(unescape, "name");