add esid to boolean frontmatter

This commit is contained in:
deathbearbrown 2017-07-27 09:17:54 -07:00 committed by Rick Waldron
parent 98ec72c17c
commit 2fa2c91899
22 changed files with 55 additions and 33 deletions

View File

@ -5,6 +5,7 @@
info: > info: >
Returns a boolean value (not a Boolean object) computed by Returns a boolean value (not a Boolean object) computed by
ToBoolean(value) ToBoolean(value)
esid: sec-terms-and-definitions-boolean-value
es5id: 15.6.1.1_A1_T1 es5id: 15.6.1.1_A1_T1
description: > description: >
Used values 1, new String("1"), new Object(1) and called without Used values 1, new String("1"), new Object(1) and called without

View File

@ -5,6 +5,7 @@
info: > info: >
Returns a boolean value (not a Boolean object) computed by Returns a boolean value (not a Boolean object) computed by
ToBoolean(value) ToBoolean(value)
esid: sec-terms-and-definitions-boolean-value
es5id: 15.6.1.1_A1_T2 es5id: 15.6.1.1_A1_T2
description: Used various number values as argument description: Used various number values as argument
---*/ ---*/

View File

@ -5,6 +5,7 @@
info: > info: >
Returns a boolean value (not a Boolean object) computed by Returns a boolean value (not a Boolean object) computed by
ToBoolean(value) ToBoolean(value)
esid: sec-terms-and-definitions-boolean-value
es5id: 15.6.1.1_A1_T3 es5id: 15.6.1.1_A1_T3
description: Used various string values as argument description: Used various string values as argument
---*/ ---*/

View File

@ -5,6 +5,7 @@
info: > info: >
Returns a boolean value (not a Boolean object) computed by Returns a boolean value (not a Boolean object) computed by
ToBoolean(value) ToBoolean(value)
esid: sec-terms-and-definitions-boolean-value
es5id: 15.6.1.1_A1_T4 es5id: 15.6.1.1_A1_T4
description: Used various undefined values and null as argument description: Used various undefined values and null as argument
---*/ ---*/

View File

@ -5,6 +5,7 @@
info: > info: >
Returns a boolean value (not a Boolean object) computed by Returns a boolean value (not a Boolean object) computed by
ToBoolean(value) ToBoolean(value)
esid: sec-terms-and-definitions-boolean-value
es5id: 15.6.1.1_A1_T5 es5id: 15.6.1.1_A1_T5
description: Used various assigning values to any variable as argument description: Used various assigning values to any variable as argument
---*/ ---*/

View File

@ -3,6 +3,7 @@
/*--- /*---
info: Boolean() returns false info: Boolean() returns false
esid: sec-terms-and-definitions-boolean-value
es5id: 15.6.1.1_A2 es5id: 15.6.1.1_A2
description: Call Boolean() and check result description: Call Boolean() and check result
---*/ ---*/

View File

@ -5,6 +5,7 @@
info: > info: >
When Boolean is called as part of a new expression it is When Boolean is called as part of a new expression it is
a constructor: it initialises the newly created object a constructor: it initialises the newly created object
esid: sec-boolean-constructor
es5id: 15.6.2.1_A1 es5id: 15.6.2.1_A1
description: Checking type of the newly created object and it value description: Checking type of the newly created object and it value
---*/ ---*/

View File

@ -6,6 +6,7 @@ info: >
The [[Prototype]] property of the newly constructed object The [[Prototype]] property of the newly constructed object
is set to the original Boolean prototype object, the one that is the is set to the original Boolean prototype object, the one that is the
initial value of Boolean.prototype initial value of Boolean.prototype
esid: sec-boolean-constructor
es5id: 15.6.2.1_A2 es5id: 15.6.2.1_A2
description: Checking prototype property of the newly created object description: Checking prototype property of the newly created object
---*/ ---*/

View File

@ -5,6 +5,7 @@
info: > info: >
The [[Value]] property of the newly constructed object The [[Value]] property of the newly constructed object
is set to ToBoolean(value) is set to ToBoolean(value)
esid: sec-boolean-constructor
es5id: 15.6.2.1_A3 es5id: 15.6.2.1_A3
description: Checking value of the newly created object description: Checking value of the newly created object
---*/ ---*/

View File

@ -5,6 +5,7 @@
info: > info: >
The [[Class]] property of the newly constructed object The [[Class]] property of the newly constructed object
is set to "Boolean" is set to "Boolean"
esid: sec-boolean-constructor
es5id: 15.6.2.1_A4 es5id: 15.6.2.1_A4
description: For testing toString function is used description: For testing toString function is used
---*/ ---*/

View File

@ -3,6 +3,7 @@
/*--- /*---
info: The Boolean constructor has the property "prototype" info: The Boolean constructor has the property "prototype"
esid: sec-boolean.prototype
es5id: 15.6.3_A1 es5id: 15.6.3_A1
description: Checking existence of the property "prototype" description: Checking existence of the property "prototype"
---*/ ---*/

View File

@ -5,6 +5,7 @@
info: > info: >
The value of the internal [[Prototype]] property of the Boolean The value of the internal [[Prototype]] property of the Boolean
constructor is the Function prototype object constructor is the Function prototype object
esid: sec-boolean.prototype
es5id: 15.6.3_A2 es5id: 15.6.3_A2
description: Checking prototype of the Boolean constructor description: Checking prototype of the Boolean constructor
---*/ ---*/

View File

@ -3,6 +3,7 @@
/*--- /*---
info: Boolean constructor has length property whose value is 1 info: Boolean constructor has length property whose value is 1
esid: sec-boolean.prototype
es5id: 15.6.3_A3 es5id: 15.6.3_A3
description: Checking Boolean.length property description: Checking Boolean.length property
---*/ ---*/

View File

@ -3,6 +3,7 @@
/*--- /*---
info: Result of boolean conversion from undefined value is false info: Result of boolean conversion from undefined value is false
esid: sec-toboolean
es5id: 9.2_A1_T1 es5id: 9.2_A1_T1
description: > description: >
Undefined, void and others are converted to Boolean by explicit Undefined, void and others are converted to Boolean by explicit

View File

@ -3,11 +3,12 @@
/*--- /*---
info: Result of boolean conversion from null value is false info: Result of boolean conversion from null value is false
esid: sec-toboolean
es5id: 9.2_A2_T1 es5id: 9.2_A2_T1
description: null convert to Boolean by explicit transformation description: null convert to Boolean by explicit transformation
---*/ ---*/
// CHECK#1 // CHECK#1
if (Boolean(null) !== false) { if (Boolean(null) !== false) {
$ERROR('#1: Boolean(null) === false. Actual: ' + (Boolean(null))); $ERROR('#1: Boolean(null) === false. Actual: ' + (Boolean(null)));
} }

View File

@ -3,13 +3,14 @@
/*--- /*---
info: Result of boolean conversion from boolean value is no conversion info: Result of boolean conversion from boolean value is no conversion
esid: sec-toboolean
es5id: 9.2_A3_T1 es5id: 9.2_A3_T1
description: true and false convert to Boolean by explicit transformation description: true and false convert to Boolean by explicit transformation
---*/ ---*/
// CHECK#1 // CHECK#1
if (Boolean(true) !== true) { if (Boolean(true) !== true) {
$ERROR('#1: Boolean(true) === true. Actual: ' + (Boolean(true))); $ERROR('#1: Boolean(true) === true. Actual: ' + (Boolean(true)));
} }
// CHECK#2 // CHECK#2

View File

@ -5,13 +5,14 @@
info: > info: >
Result of boolean conversion from number value is false if the argument Result of boolean conversion from number value is false if the argument
is +0, -0, or NaN; otherwise, is true is +0, -0, or NaN; otherwise, is true
esid: sec-toboolean
es5id: 9.2_A4_T1 es5id: 9.2_A4_T1
description: +0, -0 and NaN convert to Boolean by explicit transformation description: +0, -0 and NaN convert to Boolean by explicit transformation
---*/ ---*/
// CHECK#1 // CHECK#1
if (Boolean(+0) !== false) { if (Boolean(+0) !== false) {
$ERROR('#1: Boolean(+0) === false. Actual: ' + (Boolean(+0))); $ERROR('#1: Boolean(+0) === false. Actual: ' + (Boolean(+0)));
} }
// CHECK#2 // CHECK#2

View File

@ -5,6 +5,7 @@
info: > info: >
Result of boolean conversion from number value is false if the argument Result of boolean conversion from number value is false if the argument
is +0, -0, or NaN; otherwise, is true is +0, -0, or NaN; otherwise, is true
esid: sec-toboolean
es5id: 9.2_A4_T3 es5id: 9.2_A4_T3
description: > description: >
Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY,
@ -14,40 +15,40 @@ description: >
// CHECK#1 // CHECK#1
if (Boolean(Number.POSITIVE_INFINITY) !== true) { if (Boolean(Number.POSITIVE_INFINITY) !== true) {
$ERROR('#1: Boolean(+Infinity) === true. Actual: ' + (Boolean(+Infinity))); $ERROR('#1: Boolean(+Infinity) === true. Actual: ' + (Boolean(+Infinity)));
} }
// CHECK#2; // CHECK#2;
if (Boolean(Number.NEGATIVE_INFINITY) !== true) { if (Boolean(Number.NEGATIVE_INFINITY) !== true) {
$ERROR('#2: Boolean(-Infinity) === true. Actual: ' + (Boolean(-Infinity))); $ERROR('#2: Boolean(-Infinity) === true. Actual: ' + (Boolean(-Infinity)));
} }
// CHECK#3 // CHECK#3
if (Boolean(Number.MAX_VALUE) !== true) { if (Boolean(Number.MAX_VALUE) !== true) {
$ERROR('#3: Boolean(Number.MAX_VALUE) === true. Actual: ' + (Boolean(Number.MAX_VALUE))); $ERROR('#3: Boolean(Number.MAX_VALUE) === true. Actual: ' + (Boolean(Number.MAX_VALUE)));
} }
// CHECK#4 // CHECK#4
if (Boolean(Number.MIN_VALUE) !== true) { if (Boolean(Number.MIN_VALUE) !== true) {
$ERROR('#4: Boolean(Number.MIN_VALUE) === true. Actual: ' + (Boolean(Number.MIN_VALUE))); $ERROR('#4: Boolean(Number.MIN_VALUE) === true. Actual: ' + (Boolean(Number.MIN_VALUE)));
} }
// CHECK#5 // CHECK#5
if (Boolean(13) !== true) { if (Boolean(13) !== true) {
$ERROR('#5: Boolean(13) === true. Actual: ' + (Boolean(13))); $ERROR('#5: Boolean(13) === true. Actual: ' + (Boolean(13)));
} }
// CHECK#6 // CHECK#6
if (Boolean(-13) !== true) { if (Boolean(-13) !== true) {
$ERROR('#6: Boolean(-13) === true. Actual: ' + (Boolean(-13))); $ERROR('#6: Boolean(-13) === true. Actual: ' + (Boolean(-13)));
} }
// CHECK#7 // CHECK#7
if (Boolean(1.3) !== true) { if (Boolean(1.3) !== true) {
$ERROR('#7: Boolean(1.3) === true. Actual: ' + (Boolean(1.3))); $ERROR('#7: Boolean(1.3) === true. Actual: ' + (Boolean(1.3)));
} }
// CHECK#8 // CHECK#8
if (Boolean(-1.3) !== true) { if (Boolean(-1.3) !== true) {
$ERROR('#8: Boolean(-1.3) === true. Actual: ' + (Boolean(-1.3))); $ERROR('#8: Boolean(-1.3) === true. Actual: ' + (Boolean(-1.3)));
} }

View File

@ -5,6 +5,7 @@
info: > info: >
Result of boolean conversion from nonempty string value (length is not Result of boolean conversion from nonempty string value (length is not
zero) is true; from empty String (length is zero) is false zero) is true; from empty String (length is zero) is false
esid: sec-toboolean
es5id: 9.2_A5_T1 es5id: 9.2_A5_T1
description: "\"\" is converted to Boolean by explicit transformation" description: "\"\" is converted to Boolean by explicit transformation"
---*/ ---*/

View File

@ -5,16 +5,17 @@
info: > info: >
Result of boolean conversion from nonempty string value (length is not Result of boolean conversion from nonempty string value (length is not
zero) is true; from empty String (length is zero) is false zero) is true; from empty String (length is zero) is false
esid: sec-toboolean
es5id: 9.2_A5_T3 es5id: 9.2_A5_T3
description: Any nonempty string convert to Boolean by explicit transformation description: Any nonempty string convert to Boolean by explicit transformation
---*/ ---*/
// CHECK#1 // CHECK#1
if (Boolean(" ") !== true) { if (Boolean(" ") !== true) {
$ERROR('#1: Boolean(" ") === true. Actual: ' + (Boolean(" "))); $ERROR('#1: Boolean(" ") === true. Actual: ' + (Boolean(" ")));
} }
// CHECK#2 // CHECK#2
if (Boolean("Nonempty String") !== true) { if (Boolean("Nonempty String") !== true) {
$ERROR('#2: Boolean("Nonempty String") === true. Actual: ' + (Boolean("Nonempty String"))); $ERROR('#2: Boolean("Nonempty String") === true. Actual: ' + (Boolean("Nonempty String")));
} }

View File

@ -3,101 +3,102 @@
/*--- /*---
info: Result of boolean conversion from object is true info: Result of boolean conversion from object is true
esid: sec-toboolean
es5id: 9.2_A6_T1 es5id: 9.2_A6_T1
description: Different objects convert to Boolean by explicit transformation description: Different objects convert to Boolean by explicit transformation
---*/ ---*/
// CHECK#1 // CHECK#1
if (Boolean(new Object()) !== true) { if (Boolean(new Object()) !== true) {
$ERROR('#1: Boolean(new Object()) === true. Actual: ' + (Boolean(new Object()))); $ERROR('#1: Boolean(new Object()) === true. Actual: ' + (Boolean(new Object())));
} }
// CHECK#2 // CHECK#2
if (Boolean(new String("")) !== true) { if (Boolean(new String("")) !== true) {
$ERROR('#2: Boolean(new String("")) === true. Actual: ' + (Boolean(new String("")))); $ERROR('#2: Boolean(new String("")) === true. Actual: ' + (Boolean(new String(""))));
} }
// CHECK#3 // CHECK#3
if (Boolean(new String()) !== true) { if (Boolean(new String()) !== true) {
$ERROR('#3: Boolean(new String()) === true. Actual: ' + (Boolean(new String()))); $ERROR('#3: Boolean(new String()) === true. Actual: ' + (Boolean(new String())));
} }
// CHECK#4 // CHECK#4
if (Boolean(new Boolean(true)) !== true) { if (Boolean(new Boolean(true)) !== true) {
$ERROR('#4: Boolean(new Boolean(true)) === true. Actual: ' + (Boolean(new Boolean(true)))); $ERROR('#4: Boolean(new Boolean(true)) === true. Actual: ' + (Boolean(new Boolean(true))));
} }
// CHECK#5 // CHECK#5
if (Boolean(new Boolean(false)) !== true) { if (Boolean(new Boolean(false)) !== true) {
$ERROR('#5: Boolean(new Boolean(false)) === true. Actual: ' + (Boolean(new Boolean(false)))); $ERROR('#5: Boolean(new Boolean(false)) === true. Actual: ' + (Boolean(new Boolean(false))));
} }
// CHECK#6 // CHECK#6
if (Boolean(new Boolean()) !== true) { if (Boolean(new Boolean()) !== true) {
$ERROR('#6: Boolean(new Boolean()) === true. Actual: ' + (Boolean(new Boolean()))); $ERROR('#6: Boolean(new Boolean()) === true. Actual: ' + (Boolean(new Boolean())));
} }
// CHECK#7 // CHECK#7
if (Boolean(new Array()) !== true) { if (Boolean(new Array()) !== true) {
$ERROR('#7: Boolean(new Array()) === true. Actual: ' + (Boolean(new Array()))); $ERROR('#7: Boolean(new Array()) === true. Actual: ' + (Boolean(new Array())));
} }
// CHECK#8 // CHECK#8
if (Boolean(new Number()) !== true) { if (Boolean(new Number()) !== true) {
$ERROR('#8: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number()))); $ERROR('#8: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number())));
} }
// CHECK#9 // CHECK#9
if (Boolean(new Number(-0)) !== true) { if (Boolean(new Number(-0)) !== true) {
$ERROR('#9: Boolean(new Number(-0)) === true. Actual: ' + (Boolean(new Number(-0)))); $ERROR('#9: Boolean(new Number(-0)) === true. Actual: ' + (Boolean(new Number(-0))));
} }
// CHECK#10 // CHECK#10
if (Boolean(new Number(0)) !== true) { if (Boolean(new Number(0)) !== true) {
$ERROR('#10: Boolean(new Number(0)) === true. Actual: ' + (Boolean(new Number(0)))); $ERROR('#10: Boolean(new Number(0)) === true. Actual: ' + (Boolean(new Number(0))));
} }
// CHECK#11 // CHECK#11
if (Boolean(new Number()) !== true) { if (Boolean(new Number()) !== true) {
$ERROR('#11: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number()))); $ERROR('#11: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number())));
} }
// CHECK#12 // CHECK#12
if (Boolean(new Number(Number.NaN)) !== true) { if (Boolean(new Number(Number.NaN)) !== true) {
$ERROR('#12: Boolean(new Number(Number.NaN)) === true. Actual: ' + (Boolean(new Number(Number.NaN)))); $ERROR('#12: Boolean(new Number(Number.NaN)) === true. Actual: ' + (Boolean(new Number(Number.NaN))));
} }
// CHECK#13 // CHECK#13
if (Boolean(new Number(-1)) !== true) { if (Boolean(new Number(-1)) !== true) {
$ERROR('#13: Boolean(new Number(-1)) === true. Actual: ' + (Boolean(new Number(-1)))); $ERROR('#13: Boolean(new Number(-1)) === true. Actual: ' + (Boolean(new Number(-1))));
} }
// CHECK#14 // CHECK#14
if (Boolean(new Number(1)) !== true) { if (Boolean(new Number(1)) !== true) {
$ERROR('#14: Boolean(new Number(1)) === true. Actual: ' + (Boolean(new Number(1)))); $ERROR('#14: Boolean(new Number(1)) === true. Actual: ' + (Boolean(new Number(1))));
} }
// CHECK#15 // CHECK#15
if (Boolean(new Number(Number.POSITIVE_INFINITY)) !== true) { if (Boolean(new Number(Number.POSITIVE_INFINITY)) !== true) {
$ERROR('#15: Boolean(new Number(Number.POSITIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.POSITIVE_INFINITY)))); $ERROR('#15: Boolean(new Number(Number.POSITIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.POSITIVE_INFINITY))));
} }
// CHECK#16 // CHECK#16
if (Boolean(new Number(Number.NEGATIVE_INFINITY)) !== true) { if (Boolean(new Number(Number.NEGATIVE_INFINITY)) !== true) {
$ERROR('#16: Boolean(new Number(Number.NEGATIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.NEGATIVE_INFINITY)))); $ERROR('#16: Boolean(new Number(Number.NEGATIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.NEGATIVE_INFINITY))));
} }
// CHECK#17 // CHECK#17
if (Boolean(new Function()) !== true) { if (Boolean(new Function()) !== true) {
$ERROR('#17: Boolean(new Function()) === true. Actual: ' + (Boolean(new Function()))); $ERROR('#17: Boolean(new Function()) === true. Actual: ' + (Boolean(new Function())));
} }
// CHECK#18 // CHECK#18
if (Boolean(new Date()) !== true) { if (Boolean(new Date()) !== true) {
$ERROR('#18: Boolean(new Date()) === true. Actual: ' + (Boolean(new Date()))); $ERROR('#18: Boolean(new Date()) === true. Actual: ' + (Boolean(new Date())));
} }
// CHECK#19 // CHECK#19
if (Boolean(new Date(0)) !== true) { if (Boolean(new Date(0)) !== true) {
$ERROR('#19: Boolean(new Date(0)) === true. Actual: ' + (Boolean(new Date(0)))); $ERROR('#19: Boolean(new Date(0)) === true. Actual: ' + (Boolean(new Date(0))));
} }

View File

@ -1,6 +1,7 @@
// Copyright (C) 2013 the V8 project authors. All rights reserved. // Copyright (C) 2013 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-toboolean
es6id: 7.1.2 es6id: 7.1.2
description: > description: >
Boolean coercion operations on Symbols Boolean coercion operations on Symbols